How do I activate a browser with DOCTYPE?

Source: Internet
Author: User
Tags implement

In order to handle Web pages created on the basis of Web standards and Web pages based on the old practices of the the late 1990s, contemporary web browsers implement various engine patterns. This article explains what those patterns are and how they are triggered.

Original: Henri Sivonen activating Browser Modes with Doctype

Document Range

This article includes schema conversion (mode switching) for Firefox and other gecko based browsers, Safari, Chrome, and other WebKit based browsers, Opera, Konqueror, Mac version of the Internet Explorer, Windows Edition Internet Explorer, and embedded IE browsers. Avoid mentioning the name of the browser engine, instead using the name of the engine's most well-known browser.

Instead of documenting the exact behavior of each pattern, this article focuses on the selection mechanism of the pattern.

Mode

Here are a variety of different patterns:

Mode with content type text/html

The mode selection of text/html content depends on the DOCTYPE sniffer (DOCTYPE sniffing, discussed later in this article). In IE8, the pattern also depends on other factors. However, by default in IE8, the mode of non-LAN (non-intranet) sites that do not provide a blacklist on Microsoft depends on the document type.

It is not too much to emphasize the exact behavior of the pattern in each browser, even though there is a unified discussion in this article.

Quirk mode (Quirks mode)
quirks mode, in order to avoid "damaging" those pages that were created by the old practices of the the late 1990s, browsers violated the contemporary Web format specification. Different browsers implement different quirks of behavior. In the Internet Explorer6, 7, and 8, the quirks pattern is effectively frozen in IE5.5. In other browsers, the quirk pattern is a small offset to almost standard mode.
If you are authoring a new page, you should conform to the relevant specifications (especially CSS2.1) and use standard mode.
Standard mode (standards mode)
Standard mode, the browser attempts to properly handle compliant documents to the extent that they are in the specified browser.
different browsers follow different stages, so standard schemas are not a single goal.
HTML5 calls this pattern "non-quirk mode (no quirks modes)"
almost standard mode (almost standards mode)
dd> Irefox, Safari, Chrome, Opera (starting from 7.5) and IE8 also have a model called "almost Standard mode", which implements the vertical dimensions of table cells in a traditional way rather than strictly complying with the CSS2 specification. Mac IE5, Windows IE6 and 7, Opera7.5 previous versions and Konqueror do not require nearly standard mode because they do not strictly follow the CSS2 specification in their own standard mode to implement table cell vertical dimensions. In fact, their standard model is closer to the almost standard model of Mozilla than the standard model of Mozilla. The
HTML5 calls this pattern "restricted Eccentricity mode (limited quirks mode)".
IE7 mode
IE8 There is a pattern that essentially freezes a copy of the IE7 standard mode. Other browsers do not have a pattern like this, and the pattern is not specified by HTML5.

Schema with content type Application/xhtml+xml (XML Schema)

In Firefox, Safari, Chrome, and Opera, the Application/xhtml+xml HTTP content type (not meta element or doctype!) triggers the XML schema. In the XML schema, the browser attempts to properly handle the XML document to the extent that it is in the development browser.

E6, 7 and 8 do not support Application/xhtml+xml,mac IE5 as well.

The Application/xhtml+xml HTTP content type does not trigger an XML schema in the WebKit Nokia S60 Browser because the focus in the moving walled garden (mobile walled gardens) is compatibility with nonstandard content. (Legacy "Mobile browsers" cannot use real XML parsers because the nonstandard content is already marked as XML.) )

I can't tell exactly what's going to happen in this browser because I haven't fully tested Konqueror.



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.