It is mainly divided into the following three categories:
Trident: This kernel program was first used in Internet Explorer 4 in 1997. It is based on the Mosaic code modified by Microsoft and used in Internet Explorer 11. It is also commonly known as the “IE kernel”. Trident is actually an open kernel with a mature interface kernel design, which has led to the emergence of many browsers that use the IE kernel instead of IE (shell browsers).
Due to the “monopoly” of IE itself (although nominally IE is not a monopoly, in fact, especially from the 95’s of Windows to the early stage of XP, IE is indeed in a “monopoly” position with the help of Windows in terms of market share), which leads to the long-term dominance of the Trident kernel. Microsoft did not update the Trident kernel for a long time. This resulted in two consequences — the Trident kernel was almost out of sync with W3C standards in 2005, and security issues such as a large number of bugs in the Trident kernel were not resolved in time. Then there were open source developers and academics who publicly thought Internet Explorer was unsafe, and a lot of users who switched to other browsers, and that’s when Firefox and Opera started. The increased market share of non-Trident core browsers has also led many web developers to focus on web standards and the performance of non-IE browsers. But by now, even Microsoft itself has stopped maintaining IE.
Gecko(Firefox kernel)
Gecko(Firefox kernel) : the kernel first adopted by Netscape6 and later adopted by Firefox, Gecko is characterized by fully open code and, as a result, is highly developable, allowing programmers around the world to write code for it and add features. Because it is an open source kernel, it is favored by many people, and there are many browsers for the Gecko kernel, which is an important reason why the market share of the Gecko kernel is rapidly increasing despite its youth.
In fact, the origin of GECKO has something to do with Internet Explorer. As mentioned earlier, Internet Explorer did not use W3C standards, which led to the dissatisfaction of some developers within Microsoft. Together with some employees of Netscape, which had stopped updating at the time, they started Mozilla and rewrote the Mosaic kernel to create Gecko. In fact, the Gecko kernel is still the most popular browser for Firefox, so it is sometimes referred to as the Firefox kernel. Gecko is also a cross-platform kernel that can be used on Windows, BSD, Linux, and Mac OS X.
Add: The JavaScript engine is SpiderMonkey.
Common browsers for the Gecko kernel: Firefox, Mozilla SeaMonkey, Epiphany (earlier versions), Flock (earlier versions), k-Meleon
Presto(Opera pre-kernel)
Presto(pre-Opera kernel) (deprecated) : Discontinued and deprecated kernel used in Opera12.17 and earlier. This kernel was first used in Opera7 in 2003. This engine features extreme optimization of rendering speed at the expense of web compatibility. It is actually a dynamic kernel, and the biggest difference from the previous kernels is in scripting. Presto has an inherent advantage in that all or part of a page can be reparsed in response to a scripted event, for example. In addition, the kernel has the fastest execution time when Javascrīpt is executed. According to tests under the same conditions, the time required for Presto to execute the same Javascrīpt is only about 1/3 that of Trident and Gecko (Trident is the slowest, but there is not much difference between them). One of the modifiers of this article thought that the test information was too old and incomplete, because he had done small tests that showed parts of Presto to be fast and parts to be slow, and all kernels to be equal. During that test, WebCore kernel was not tested because Apple’s hardware condition was different from ordinary PC’s. Unfortunately, Presto is a commercial engine, and Opera is the only alternative to the NDSBrowser, Wii Internet Channle, and Nokia 770 web browser, which limits its growth. Opera has switched to Google Chrome’s Blink kernel.
4. Webkit(Safari kernel,Chrome kernel prototype, open source)
Webkit(Safari kernel,Chrome kernel prototype, open source): This is Apple’s own kernel and the kernel used by Apple’s Safari browser.
WebKit kernel common browser: Maxthon browser 3, Symbian mobile browser, Android default browser.
Fifth, Blink
Blink is a browser typography engine developed by Google and Opera Software. Google plans to use this rendering engine as part of the Chromium Project and announced it in April 2013. The rendering engine is an offshoot of the WebCore component of the open source engine WebKit and is used in Chrome (28 and later), Opera (15 and later), and Yandex.
Advantages and disadvantages of the browser kernel
Trident: This browser kernel is the kernel used by Internet Explorer, because in the early IE had a large market share, so this kernel is more popular, there were a lot of web pages are also written according to this kernel standard, but in fact this kernel is not very good support for the real web standards, even in 2005, The Trident kernel is buggy and does not support W3C compliant web code very well. This was evident in earlier versions of Internet Explorer, such as before Internet Explorer 5.5 (including Internet Explorer 5.5). Ie6 doesn’t support W3C standards very well either, and many of us are using ie6, which is actually an earlier version.
However, due to the high market share of IE, Microsoft has not updated the Trident kernel for a long time, which leads to two results: 1. The Trident kernel is out of line with the W3C standard. 2. A large number of Trident kernel bugs and other security problems have not been solved, and some experts and scholars publicly expressed their opinion that Internet Explorer is not secure, so many users began to turn to other browsers. FF and Opera emerged during this period. Gecko: This is the kernel used by Firefox and Flock, which has the advantage of being powerful and rich, supporting many complex web effects and browser extensions, but at the obvious cost of consuming resources such as memory. Presto: Opera uses the Presto kernel, which is considered to be the fastest kernel for web browsing. This is due to its inherent advantages in development. It can handle javascript and other scripting languages three times faster than other kernels, but the disadvantage is that some web compatibility is lost for the sake of fast speed.
Its: Webkit is the kernel for Safari, but Safari is the MAC browser (there is a Windows version, but there are few), so the advantages and disadvantages of this kernel are as follows: faster web browsing. Although not as good as Presto, it is better than Gecko and Trident. The disadvantage is that it has low fault tolerance for web code, that is, it has low compatibility with web code, and some non-standard web pages cannot be displayed correctly.
Conclusion: As far as browsers are concerned, the Internet has experienced a decade of rapid development. In recent years, many new browsers have been launched on the market, but they are not using self-developed kernels, so the browser kernel itself has not actually made substantial breakthroughs.
The kernel classification used by major browsers
Trident kernel: IE, MaxThon, TT, The World, 360, sogou browser such as Gecko kernel: Netscape6 and above version, FF, MozillaSuite/SeaMonkey Presto kernel: Opera7 and above
Webkit kernel: Safari,Chrome, etc
I. Reasons for compatibility:
Because different browsers use the kernel and support HTML and other web language standards are different; And the user client environment (such as different resolution) caused by the display effect can not achieve the ideal effect. The most common problem is that web elements are dislocated and misplaced. Compatibility is mainly caused by different kernels or versions of kernels;
Two, the browser on the webpage compatible support of the resolution mode:
1. Why are there so many patterns?
Due to historical reasons, different browsers render different pages, and even the same browser renders different pages in different versions. Before the W3C standard came out, browsers did not have a uniform specification for page rendering, resulting in Quirks mode or Compatibility mode. Thanks to the W3C standards, browsers have a unified standard for rendering pages (CSScompat or Strict mode or Standars mode), and that’s the simplest difference.
2. Which mode does the browser use for parsing?
Firefox has always worked in standard mode, but IE (6,7,8) standard mode is very different from weird mode, mainly in the interpretation of the box model,
So which mode should the browser use for rendering? This leads to a DTD that is both a header declaration for a web page, and the browser recognizes the DTD and adopts the corresponding rendering mode:
1. The browser needs to make the old web page work properly, but this part of the web page is not a DOCTYPE declaration, so the browser does not have a docTYPE declaration page quirks mode resolution. 2. For pages that have a docType declaration, which browser uses which mode to parse, here is a detailed list for reference: hsivonen.iki.fi/doctype. \ 3. For pages that have docType declarations, here are a few simple rules: For those docType declarations that the browser does not recognize, browsers use strict mode parsing. 4. When a DOCtype declaration is not made using a DTD or is made using a DTD below HTML4 (excluding HTML4), almost all browsers use quirks mode for rendering, and the rest use strict mode for parsing. 5. It can be said that the vast majority of existing web pages with docType declarations are parsed in strict mode.
6. In ie6, quirks mode is used when an XML declaration (such as 🙂 precedes a doctype declaration. This rule has been removed in IE7.
3, How to set to quirks mode and standard mode:
3.1. Set weird Mode:
Method 1: add to the page item
Method two: add nothing.
3.2. Set to standard mode:
Add one of the following: HTML4 provides three doctypes to choose from: \
XHTML1.0 provides three doctypes to choose from:
(1) Transitional type \
(2) Strict \
(3) Frameset
Note: Difference between transitional type and strict type:
Transitional DOCTYPEs are only intended to make the transition from old to new, and Strict DOCTYPEs is the default document declaration, applicable to constructs of HTML 4.01 and XHTML 1.0.
Transitional DOCTYPE is usually used because the code contains too much archaic writing and it is difficult to convert completely to Strict DOCTYPE at once. But Strict DOCTYPE should be your goal. It encourages and sometimes forces you to separate structure from presentation, to write the presentation layer code in CSS, to separate structure from presentation, and to make maintaining a site very easy.
For those of you who are heading to Strict, there are some differences that can cause developers to make mistakes, which I’ll cover next. Tags not supported under Strict DOCTYPEs: Center font iframe srike U Properties not supported under Strict DOCTYPEs align col, colgroup, tbody, td, tfoot, th, thead, And tr) language background BGColor border (table support) height (img and object support) hspace name (HTML 4.01 Strict support, Noshade Nowrap Target text, link, vLink, and Alink vspace Width (img, Object, table, col, And ColGroup support) content model differences
The content model of element types describes what instances of element types can be included. At this point, the biggest difference between the two document declarations is that blockQuote, body, and form elements can only contain block-level elements, such as: Text and images are not allowed to be contained directly in the body, but must be contained in block elements such as P or div. Input elements are not directly contained in the next blockQuote element of the form element. They must be contained in block elements such as P or div
In transitioning to Strict DOCTYPEs, it is much more effective to know what each element does than what each element looks like.
4, how to decide now is the standard mode or quirks mode: method 1: execute the following code alert patMode (window.top.document.com); //CSS1Compat = CSS1Compat = CSS1Compat = CSS1Compat Alert (.boxModel)alert(.boxModel)alert(.boxModel) alert(.support.boxModel) Remove the default properties of different browsers to minimize compatibility issues between different browsers. It is best to set the CSS resert code according to your project. The main disadvantages are: erasing the browser default properties and having a large inheritance chain in the browser tuning tool
2, CSS hack
2.1 definition: CSS hacks Because browsers from different vendors, such as Internet Explorer,Safari, Firefox, And Chrome, or different versions of browsers from the same vendor, such as Internet Explorer 6 and Internet Explorer 7, have different understanding of CSS parsing, resulting in different page effects. Not getting the page look we need. At this time we need to write different CSS for different browsers, so that it can be compatible with different browsers at the same time, can also get the page effect we want in different browsers, CSS hack writing order, generally will be applicable to a wide range of strong identification of CSS defined in the front.
2.2 classification of * * * *
CSS hacks generally have three forms: CSS attribute prefix method, selector prefix method and IE conditional comment method (i.e. HTML header reference if IE) Hack. In actual projects, CSS hacks are mostly introduced for the performance differences between different versions of IE browser.