Shades88
Shades88

Reputation: 8360

Can anyone explain me true nature of quirks mode as seen in IE?

In developer tools of IE i see there is a quirks mode. I have a web toolbar kind of application, that when put on quirks mode, breaks completely. So can anyone explain me true nature of quirks mode as seen in IE ?? What kind of doctype triggers this quirks mode? I have a fellow developer who is constantly suggesting me to work on that. But I am in doubt how much worth is it to spend many hours to make it quirks mode compatible. First thing I don't know where and how this quirks mode applies.

I referred to couple of articles like msdn blogs but couldn't find a credible explanation. So can anyone explain me with more clarity as to what this quirks mode is ?

Upvotes: 0

Views: 310

Answers (1)

cHao
cHao

Reputation: 86524

"Quirks mode" is basically a throwback to the days before people really cared about standards. IE and Netscape (the Big Two at the time) rendered things rather differently from most other browsers and even from each other, and when validation and standards became a big thing, valid HTML and CSS broke pages all to hell. In order to keep things sane and keep from breaking the whole Web overnight, browser makers (particularly MS) made their new browsers capable of rendering pages bug-compatibly with their old ones. They couldn't just always render things the old way, though, or people would find a browser that worked "right". Thus was born "quirks mode".

Basically, in order to trigger quirks mode, you just don't specify a doctype. (I think an HTML 3.2 doctype may trigger it as well, but never cared enough to try it. Either way, proper doctype declarations for HTML4+ don't.) That basically tells the browser "hey, render this however you see fit". In most browsers, it won't make much of a difference...but ooooboy, in IE, things tend to look horrid if your HTML is anything close to modern.

These days, you should always be using a doctype (and it should be HTML 4 or better), so quirks mode is more a historical thing -- unless of course you forget the doctype. Don't code for it, though; don't even legitimize its existence. It's the old bugs of the past, and we're trying to get rid of them.

Upvotes: 1

Related Questions