Table of Contents
1. Typesetting engine
2. JavaScript engine
3. Single and dual-core engines
2. Compatibility issues
1. CSS compatibility
2, html compatibility
Home Web Front-end HTML Tutorial Analysis of browser kernel and browser compatibility issues

Analysis of browser kernel and browser compatibility issues

Aug 15, 2018 pm 02:17 PM
css html javascript

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; 类型的 -->
<!-- 这样写元素之间有间隙 -->
<ul>
  <li>apple</li>
  <li>banana</li>
  <li>pineapple</li>
  <li>peach</li>
  <li>orange</li>
</ul>
<!-- 换个写法解决问题-->
<ul>
  <li>apple</li><li>
  banana</li><li>
  pineapple</li><li>
  peach</li><li>
  orange</li>
</ul>
Copy after login

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

<head>
    <!-- meta部分 -->
    <title></title>
    <!-- 可能的script部分 -->
    <script type="text/javascript"></script>   <!-- 关键:添加一个空标签 -->
    <!-- link部分 -->
</head>
Copy after login

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 of this Website
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

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

AI Hentai Generator

AI Hentai Generator

Generate AI Hentai for free.

Hot Article

R.E.P.O. Energy Crystals Explained and What They Do (Yellow Crystal)
3 weeks ago By 尊渡假赌尊渡假赌尊渡假赌
R.E.P.O. Best Graphic Settings
3 weeks ago By 尊渡假赌尊渡假赌尊渡假赌
R.E.P.O. How to Fix Audio if You Can't Hear Anyone
3 weeks ago By 尊渡假赌尊渡假赌尊渡假赌

Hot Tools

Notepad++7.3.1

Notepad++7.3.1

Easy-to-use and free code editor

SublimeText3 Chinese version

SublimeText3 Chinese version

Chinese version, very easy to use

Zend Studio 13.0.1

Zend Studio 13.0.1

Powerful PHP integrated development environment

Dreamweaver CS6

Dreamweaver CS6

Visual web development tools

SublimeText3 Mac version

SublimeText3 Mac version

God-level code editing software (SublimeText3)

How to use bootstrap button How to use bootstrap button Apr 07, 2025 pm 03:09 PM

How to use the Bootstrap button? Introduce Bootstrap CSS to create button elements and add Bootstrap button class to add button text

How to resize bootstrap How to resize bootstrap Apr 07, 2025 pm 03:18 PM

To adjust the size of elements in Bootstrap, you can use the dimension class, which includes: adjusting width: .col-, .w-, .mw-adjust height: .h-, .min-h-, .max-h-

How to insert pictures on bootstrap How to insert pictures on bootstrap Apr 07, 2025 pm 03:30 PM

There are several ways to insert images in Bootstrap: insert images directly, using the HTML img tag. With the Bootstrap image component, you can provide responsive images and more styles. Set the image size, use the img-fluid class to make the image adaptable. Set the border, using the img-bordered class. Set the rounded corners and use the img-rounded class. Set the shadow, use the shadow class. Resize and position the image, using CSS style. Using the background image, use the background-image CSS property.

How to upload files on bootstrap How to upload files on bootstrap Apr 07, 2025 pm 01:09 PM

The file upload function can be implemented through Bootstrap. The steps are as follows: introduce Bootstrap CSS and JavaScript files; create file input fields; create file upload buttons; handle file uploads (using FormData to collect data and then send to the server); custom style (optional).

How to remove the default style in Bootstrap list? How to remove the default style in Bootstrap list? Apr 07, 2025 am 10:18 AM

The default style of the Bootstrap list can be removed with CSS override. Use more specific CSS rules and selectors, follow the "proximity principle" and "weight principle", overriding the Bootstrap default style. To avoid style conflicts, more targeted selectors can be used. If the override is unsuccessful, adjust the weight of the custom CSS. At the same time, pay attention to performance optimization, avoid overuse of !important, and write concise and efficient CSS code.

How to change the size of a Bootstrap list? How to change the size of a Bootstrap list? Apr 07, 2025 am 10:45 AM

The size of a Bootstrap list depends on the size of the container that contains the list, not the list itself. Using Bootstrap's grid system or Flexbox can control the size of the container, thereby indirectly resizing the list items.

How to verify bootstrap date How to verify bootstrap date Apr 07, 2025 pm 03:06 PM

To verify dates in Bootstrap, follow these steps: Introduce the required scripts and styles; initialize the date selector component; set the data-bv-date attribute to enable verification; configure verification rules (such as date formats, error messages, etc.); integrate the Bootstrap verification framework and automatically verify date input when form is submitted.

How to layout bootstrap How to layout bootstrap Apr 07, 2025 pm 02:24 PM

To use Bootstrap to layout a website, you need to use a grid system to divide the page into containers, rows, and columns. First add the container, then add the rows in it, add the columns within the row, and finally add the content in the column. Bootstrap's responsive layout function automatically adjusts the layout according to breakpoints (xs, sm, md, lg, xl). Different layouts under different screen sizes can be achieved by using responsive classes.

See all articles