SitePoint Sponsor

User Tag List

Results 1 to 5 of 5
  1. #1
    SitePoint Enthusiast
    Join Date
    Feb 2010
    Posts
    88
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Quirks mode in various web browsers

    Quirks mode in IE 6 and greater, actually renders a page using IE 5.5, which is called quirks mode.

    Firefox uses Netscape 4.(I think)

    What is the quirks mode in Webkit based browsers rendered in or based on?
    Safari,
    Chrome,
    Konquerer (KHTML).
    The same question goes for Opera.

    Thanks in advance,

  2. #2
    SitePoint Enthusiast adityamenon90's Avatar
    Join Date
    Apr 2010
    Posts
    36
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I don't think quirks mode is *based on anything, it's just that: quirks mode; something that makes the browser do crazy things while rendering your markup.

    If you are being bothered by the browsers though, and you want to shake quirks mode off your tail bumper, just use the "Strict" Doctype in XHTML. Really, you don't even need to follow the rules, all you gotta do is _say you're following the rules, at the beginning of the file.

    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">

    Also, adding a "Reset" CSS file will get you rid of those darned IE bugs.
    http://meyerweb.com/eric/tools/css/reset/

    Don't mention it.

  3. #3
    Non-Member
    Join Date
    Jun 2010
    Location
    4727′35″N 2618′0″E
    Posts
    1,789
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    "Quirks Mode is triggered by doctype sniffing, also known as doctype switching. This means that the browser inspects the start of an HTML document to see whether it con&#173;tains a doctype declaration as required by HTML specifications." - from here.

    strict mode is triggered by the presence of a valid doctype declaration, not just strict DTDs.

    "WebKit, like most browser engines, has a quirks mode that is triggered by certain old HTML doctypes, or lack of a doctype declaration in text/html. Documents with newer or unknown doctypes, or sent as XML, are processed in standards mode. Like Mozilla and Opera, we apply only a limited set of nonstandard behaviors in quirks mode, and otherwise fix bugs across both modes, if they do not have a specific significant impact on Web compatibility. This is in contrast to the IE approach of completely freezing old behavior in quirks mode." - from here.

    WebKit seems to behave a bit different when it comes to quirks mode, but the general rules are the same: the lack of DTD usually triggers quirks mode.

  4. #4
    SitePoint Enthusiast
    Join Date
    Feb 2010
    Posts
    88
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Thanks for the interesting link..

    I found this juicy nugget about Webkit:
    And finally, we have a Dashboard compatibility mode that has a few extra quirks beyond quirks mode, to handle Dashboard widgets that were coded to depend on old WebKit bugs.
    I would find it interesting to see what quirks, all these quirks mode support, and how long they will hang around. How many sites still depend on the broken box model today? Yet we carry the carcass of an old IE5 rendering engine "just in case" we need it.

    Its amazing the great lengths browsers go to bring us what they can. With all these different "modes", the code to write browsers will get ever longer, and harder to maintain. With CSS3 not even finished, and the browsers supporting it already, I look foward to future quirk modes to come.

  5. #5
    The CSS Clinic is open silver trophybronze trophy
    Paul O'B's Avatar
    Join Date
    Jan 2003
    Location
    Hampshire UK
    Posts
    39,871
    Mentioned
    159 Post(s)
    Tagged
    4 Thread(s)
    Quote Originally Posted by hypernetware View Post
    Quirks mode in IE 6 and greater, actually renders a page using IE 5.5, which is called quirks mode.
    No it doesn't render as Ie5.5 exactly as there are many differences. It does use the broken box model like ie5 but there are too many diffrences to rely on it as an ie5.x copy.
    e.g.
    Code:
    <! quirks mode initiated with no doctype -->
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
    <title>Untitled Document</title>
    <style>
    div{back\ground:red}/* backslash hack*/
    </style>
    </head>
    <body>
    <div>only ie5.x is not red</div>
    </body>
    </html>
    There are in fact three modes quirks mode, almost standards mode and standards mode and all vary between browsers (ignoring ie8s myriad of modes of course).

    See the sitepoint reference for a quick run down and then visit here for all the details.


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •