The impact of weird mode (Quirks mode) on HTML pages

Source: Internet
Author: User
Tags html page new features switches versions

Quirks Mode Overview

Defined

What is Quirks Mode? In short, Quirks mode is a page-rendering mode that browsers have designed to be compatible with older browsers and not strictly comply with the standard Web pages.

History

Two document modes generated by the rendering engine

When it comes to Quirks modes, it starts with the browser-rendering engine. We know that all browsers have their own page rendering engine, rendering engine consists of two parts, part of the HTML, CSS code parsing, and the other part of the script code parsing, the two parts can be combined to draw a complete page.

As you can see from table 1, the main browsers in the market now have the Webkit rendering engine in addition to Chrome and Safari, while the remaining three browsers use different rendering methods (different HTML parsing, different JS parsing). We will not discuss the differences between different rendering engines when rendering the page, but for each of the rendering engines, the way they render the page varies greatly with the development of the version.

IE was the first to put forward Quirks mode and Standards mode (a pattern corresponding to the Quirks), then Firefox, Chrome, Safari, Opera and other browsers also support the two rendering methods. But only in IE users are free to switch between the two ways, and other browsers are automatically matching one of them. The following will mainly take IE as an example to illustrate the impact of Quirks Mode on page drawing, and table 2 shows that as its rendering engine, ie changes the rendering of HTML pages as follows.

As you can see from table 2, with IE's development, its rendering engine (early MSHTML.dll, later named Trident) is adding new features and correcting earlier versions of bugs. Before the official release of IE6 in 2001, the market was mainly IE and Netscape's Navigator two browser, and IE has a large user base, so most of the pages are designed for IE, but IE's rendering engine does not follow the W3 C's specification, at that time, Microsoft has recognized the importance of the IE6, so when IE developed to the time, the rendering engine (MSHTML.dll) made an important change, the original does not conform to the requirements of the standard of the Format box mode in the "" "to be consistent with the standards of the international standard (after will be discussed in detail), as a result of this significant change, originally for IE old version of the design of the HTML page can not be correctly displayed, so the release of IE6 with a switch back to the IE5 page rendering mode function, this function for the first time proposed Quirks mode.

When the user needs to display an older version of the page to switch to Quirks mode, the browser's rendering engine switches to the corresponding version of IE5.5 (MSHTML.dll 5.5.x), box mode is drawn before, so that the page can be displayed correctly. When a user needs to display some new pages that meet the requirements of the web, the render engine switches to a Standards mode (standard pattern) corresponding to the Quirks mode, in which the rendering engine is the current version, which satisfies more of the requirements of the international standard. The difference between the two Mode is that it works in different versions of the rendering engine environment.

Finally, Quirks mode and standards mode are called the browser's document mode.

More Wonderful content: http://www.bianceng.cn/web/Html/

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.