search
HomeWeb Front-endHTML TutorialAnalysis of browser kernel and browser compatibility issues

The content of this article is about the analysis of browser kernel and browser compatibility issues. It has certain reference value. Friends in need can refer to it. I hope it will be helpful to you.

1. Browser kernel

Rendering Engine, translated into Chinese, has many names, such as typesetting engine, interpretation engine, and rendering engine. It is now popularly called the browser kernel. It is used to render web page content and convert the web page content and layout code into visual pages. A browser may have more than one core.

1. Typesetting engine

(1) Trident (Windows) 360 IE
(2) Gecko (cross-platform) Mozilla Firefox, Mozilla SeaMonkey
(3) KHTML (Linux ) Konqueror
(4) WebKit (cross-platform) Apple Safari, Symbian system browser
(5) Chromium (cross-platform) Chromium, Google Chrome, SRWare Iron, Comodo Dragon
(6) Presto (cross-platform) Platform) Opera

##chrome、operachromium or Blink##360、Cheetah, 2345 browserFirefox##Safari WebkitSogou, Aoyou, QQ Browsertrident webkit

2. JavaScript engine

(1) Chakra
Chakra, the new JavaScript engine enabled by IE9.
(2)SpiderMonkey/TraceMonkey/JaegerMonkey
SpiderMonkey is used in Mozilla Firefox 1.0-3.0, TraceMonkey is used in Mozilla Firefox 3.5-3.6, and JaegerMonkey is used in Mozilla Firefox 4.0 and subsequent versions.
(3)V8
Apply to Chrome and Maxthon 3.
(4)Nitro
Apply to Safari 4 and subsequent versions.
(5) Linear A/Linear B/Futhark/Carakan
Linear A is used in Opera 4.0-6.1 versions, Linear B is used in Opera 7.0~9.2 versions, Futhark is used in Opera 9.5-10.2 versions, Carakan is used in Opera 10.5 and subsequent versions.
(6)KJS
The JavaScript engine corresponding to KHTML.

3. Single and dual-core engines

(1) Trident/Gecko dual-core browser
(2) Trident/WebKit dual-core browser
Now the most mainstream "dual-core" browsing in China Most browsers have this architecture, including 360 Speed ​​Browser, World Window Browser Speed ​​Edition, Maxthon 3 Sogou Browser 3, QQ Browser, Maple Browser, Kuai Kuai Browser, Baidu Browser, Ayun Browser ( Later versions), Sunflower Browser, the most bizarre of which is Maxthon 3. Other dual-core browsers are based on Chromium, while Maxthon is based on WebKit, but it happens to use the V8 engine.
(3) Trident/Gecko/WebKit three-core browser
The one currently available should be Japan’s Lunascape. Avant will also be classified here after adding the WebKit core. To be honest, Lunascape is really difficult to use and really weird. Each core is relatively independent, the shell itself is not strong enough, and the stability is not high, so it is better to use a single-core browser.

2. Compatibility issues

Regarding browser compatibility issues, they are generally divided into HTML, Javascript compatibility, and CSS compatibility. Among them, HTML-related issues are easier to deal with. It's just that the higher version browser uses elements that the lower version browser cannot recognize, causing it to be unable to parse, so you should pay attention to it. In particular, HTML5 adds many new tags, and lower version browsers have a bit of an impact on the progress of the times.

1. CSS compatibility

(1) There is a big gap between the default settings of margin and padding in different browsers. Use *{margin:0px;padding:0px;}
(2) The height of this label in ie6, 7 and Ayouli is uncontrolled and exceeds the height set by yourself. Add overflow:hidden
to this label ( 3) The image has spacing by default, use float
(4) The box collapses, and the parent element is added (overflow: hidden;) to become a BFC element
(5) The font size is inconsistent in different browsers, use line-height :14px;Specify height
(6) IE6 does not support png transparent effect
(7) CSS Hack compatibility attribute setting

2, html compatibility

HTML article
(1) Style compatibility issue



(2) Weird mode
Weird mode is a compatibility mode that does not comply with W3C specifications. The width includes contentWidth, left and right padding, and left and right borders. The entire range within (the same goes for height), similar to box-sizing: border-box;, and the font-size of the table cannot be inherited from the parent element. The following situations will trigger the browser's Quirks Mode:

Not writing DOCTYPE triggers Quirks Mode
Add ="utf-8" ?>, IE6 will trigger Quirks Mode
Add before ..>, IE7 will enter Quirks Mode
..> If there is any non-empty character before it, weird mode will be triggered under IE6
If there is XML before ..>, it will not trigger weird mode under IE7 mode, but cannot have other non-empty characters
Check document.compatMode to see which mode the browser is working in: the value BackCompat is the weird mode, the value CSS1Compat is the standard mode

(3) display :inline-block There is a gap between elements

<!-- 以下的 li 元素是 display: inline; 类型的 -->
<!-- 这样写元素之间有间隙 -->
      
  • apple
  •   
  • banana
  •   
  • pineapple
  •   
  • peach
  •   
  • orange
      
  • apple
  •   banana
  •   pineapple
  •   peach
  •   orange

(4) IE may have a temporary failure of document style

    <!-- meta部分 -->
    <title></title>
    <!-- 可能的script部分 -->
    <script></script>   <!-- 关键:添加一个空标签 -->
    <!-- link部分 -->

Related recommendations:

Browser kernel information sorting

Browser kernel URL decomposition web server

js judge browsing Method of browser version and browser kernel_javascript skills

Browser Kernel
IE, Baidu, World Window Trident
IE chromium
Gecko

The above is the detailed content of Analysis of browser kernel and browser compatibility issues. For more information, please follow other related articles on the PHP Chinese website!

Statement
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
The Future of HTML, CSS, and JavaScript: Web Development TrendsThe Future of HTML, CSS, and JavaScript: Web Development TrendsApr 19, 2025 am 12:02 AM

The future trends of HTML are semantics and web components, the future trends of CSS are CSS-in-JS and CSSHoudini, and the future trends of JavaScript are WebAssembly and Serverless. 1. HTML semantics improve accessibility and SEO effects, and Web components improve development efficiency, but attention should be paid to browser compatibility. 2. CSS-in-JS enhances style management flexibility but may increase file size. CSSHoudini allows direct operation of CSS rendering. 3.WebAssembly optimizes browser application performance but has a steep learning curve, and Serverless simplifies development but requires optimization of cold start problems.

HTML: The Structure, CSS: The Style, JavaScript: The BehaviorHTML: The Structure, CSS: The Style, JavaScript: The BehaviorApr 18, 2025 am 12:09 AM

The roles of HTML, CSS and JavaScript in web development are: 1. HTML defines the web page structure, 2. CSS controls the web page style, and 3. JavaScript adds dynamic behavior. Together, they build the framework, aesthetics and interactivity of modern websites.

The Future of HTML: Evolution and Trends in Web DesignThe Future of HTML: Evolution and Trends in Web DesignApr 17, 2025 am 12:12 AM

The future of HTML is full of infinite possibilities. 1) New features and standards will include more semantic tags and the popularity of WebComponents. 2) The web design trend will continue to develop towards responsive and accessible design. 3) Performance optimization will improve the user experience through responsive image loading and lazy loading technologies.

HTML vs. CSS vs. JavaScript: A Comparative OverviewHTML vs. CSS vs. JavaScript: A Comparative OverviewApr 16, 2025 am 12:04 AM

The roles of HTML, CSS and JavaScript in web development are: HTML is responsible for content structure, CSS is responsible for style, and JavaScript is responsible for dynamic behavior. 1. HTML defines the web page structure and content through tags to ensure semantics. 2. CSS controls the web page style through selectors and attributes to make it beautiful and easy to read. 3. JavaScript controls web page behavior through scripts to achieve dynamic and interactive functions.

HTML: Is It a Programming Language or Something Else?HTML: Is It a Programming Language or Something Else?Apr 15, 2025 am 12:13 AM

HTMLisnotaprogramminglanguage;itisamarkuplanguage.1)HTMLstructuresandformatswebcontentusingtags.2)ItworkswithCSSforstylingandJavaScriptforinteractivity,enhancingwebdevelopment.

HTML: Building the Structure of Web PagesHTML: Building the Structure of Web PagesApr 14, 2025 am 12:14 AM

HTML is the cornerstone of building web page structure. 1. HTML defines the content structure and semantics, and uses, etc. tags. 2. Provide semantic markers, such as, etc., to improve SEO effect. 3. To realize user interaction through tags, pay attention to form verification. 4. Use advanced elements such as, combined with JavaScript to achieve dynamic effects. 5. Common errors include unclosed labels and unquoted attribute values, and verification tools are required. 6. Optimization strategies include reducing HTTP requests, compressing HTML, using semantic tags, etc.

From Text to Websites: The Power of HTMLFrom Text to Websites: The Power of HTMLApr 13, 2025 am 12:07 AM

HTML is a language used to build web pages, defining web page structure and content through tags and attributes. 1) HTML organizes document structure through tags, such as,. 2) The browser parses HTML to build the DOM and renders the web page. 3) New features of HTML5, such as, enhance multimedia functions. 4) Common errors include unclosed labels and unquoted attribute values. 5) Optimization suggestions include using semantic tags and reducing file size.

Understanding HTML, CSS, and JavaScript: A Beginner's GuideUnderstanding HTML, CSS, and JavaScript: A Beginner's GuideApr 12, 2025 am 12:02 AM

WebdevelopmentreliesonHTML,CSS,andJavaScript:1)HTMLstructurescontent,2)CSSstylesit,and3)JavaScriptaddsinteractivity,formingthebasisofmodernwebexperiences.

See all articles

Hot AI Tools

Undresser.AI Undress

Undresser.AI Undress

AI-powered app for creating realistic nude photos

AI Clothes Remover

AI Clothes Remover

Online AI tool for removing clothes from photos.

Undress AI Tool

Undress AI Tool

Undress images for free

Clothoff.io

Clothoff.io

AI clothes remover

Video Face Swap

Video Face Swap

Swap faces in any video effortlessly with our completely free AI face swap tool!

Hot Tools

Notepad++7.3.1

Notepad++7.3.1

Easy-to-use and free code editor

Atom editor mac version download

Atom editor mac version download

The most popular open source editor

VSCode Windows 64-bit Download

VSCode Windows 64-bit Download

A free and powerful IDE editor launched by Microsoft

Safe Exam Browser

Safe Exam Browser

Safe Exam Browser is a secure browser environment for taking online exams securely. This software turns any computer into a secure workstation. It controls access to any utility and prevents students from using unauthorized resources.

ZendStudio 13.5.1 Mac

ZendStudio 13.5.1 Mac

Powerful PHP integrated development environment