quirks mode

M

Michael Jaeger

Hi,

I keep reading the term "quirks mode" more recently now, but I have to
admit that I seem to be one of the unitiated. What does it mean?
Can anyone of you guys out there enlighten me, please?

Thanks,

Mike
 
D

David Christopher Weichert

I keep reading the term "quirks mode" more recently now, but I have to
admit that I seem to be one of the unitiated. What does it mean?

Most modern browsers have two rendering modes. The Quirks mode render HTML
like old browsers (i.e. Netscape 4, Internet Explorer 4/5). In standard
mode they render the page adhering to W3C recommendations. The use of
standard mode ist triggered by the presence of a document type declaration
(i.e. <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN"
"http://www.w3.org/TR/html4/DTD/strict.dtd">).

see: http://gutfeldt.ch/matthias/articles/doctypeswitch.html
see also:
http://www.carsten-protsch.de/zwischennetz/doctype/einleitung.html


HTH
David
 
W

Whitecrest

I keep reading the term "quirks mode" more recently now, but I have to
admit that I seem to be one of the unitiated. What does it mean?
Can anyone of you guys out there enlighten me, please?

Basically, before there were standards, Microsoft wanted to move ahead
with CSS, so they made the decision (since no one else would) that
things should work a certain way. They moved ahead and gave everyone a
CSS browser, that worked great.

Then someone got together and said well this is the new standard, and
RATHER than using something that was already used on 90% of the worlds
browsers. They decided it would be best to define things differently,
thusly fucking everything up.

Quirk mode lets the browser switch from handling this CSS the old way or
the new way. Playing with different combinations base on what you are
trying to do will result in different looks.
 
C

C A Upsdell

Whitecrest said:
Basically, before there were standards, Microsoft wanted to move ahead
with CSS, so they made the decision (since no one else would) that
things should work a certain way. They moved ahead and gave everyone a
CSS browser, that worked great.

Then someone got together and said well this is the new standard, and
RATHER than using something that was already used on 90% of the worlds
browsers. They decided it would be best to define things differently,
thusly fucking everything up.

No. What happened is more complex than that.

First, NN4 and IE4 came out before the CSS1 standards were published, so
both implemented CSS wrongly and incompletely, with NN4 being far worse.
(The same can also be said for their compliance with the HTML standards.)

Second, CSS support improved as the browsers were upgraded -- NN4.0x to
NN4.5+, and IE4 to IE5 to IE5.5 to IE6 -- with IE remaining well in the
lead, but still with many non-compliancy problems. In the meanwhile Mozilla
and Opera were evolving, also providing better CSS support as they were
upgraded.

Third, a major factor impeding improved compliance was the need to maintain
compatibility with older browsers: further improvements in compliance
threatened to break many existing websites. To circumvent this problem
Microsoft introduced DOCTYPE sniffing to decide how compliant IE should be,
with some DOCTYPEs triggering quirks mode, where designers could expect IE
to work much as it had in the past, and with other DOCTYPEs triggering
standards mode, where designers could expect IE to work more compliantly
with the standards. The Mozilla, Opera, and Safari designers made similar
decisions, each adding DOCTYPE sniffing to their browsers.

Fourth, further improvements in IE ended with the appearance of IE6 (its
successor not expected now till mid-2006), but other browsers have continued
in their quest to improve standards compliance, and have taken over the lead
from IE.

The bottom line is that no browser is 100% in compliance with standards,
that successful browsers have become more compliant with each new version,
that Microsoft has recently lost its lead in standards support, and that
further improvements in IE are stalled, awaiting the next major release of
Windows.
 
D

David Christopher Weichert

Basically, before there were standards, Microsoft wanted to move ahead
with CSS, so they made the decision (since no one else would) that
things should work a certain way. They moved ahead and gave everyone a
CSS browser, that worked great.

Although this is true, CSS was not invented by Microsoft, but by the W3C.
Microsoft moved ahead with IE 3.0 (in August 1996) before CSS had become a
stable, i.e. reached recommendation status (which was achieved by December
1996). Hence their implementation was different from the final official
version. (They also implemented XSLT ahead of time).

Whitecrest makes it sound like this early adoption is good, and it is
probably so for those who are keen on seeing a technology preview. For the
web at large however this was a clear take-over bid by Microsoft and it
seems (at least for the time being) a successful one. It also seems that
we are still not writing in some Microsoft Web Language and the existence
of alt.html is proof that an independent web with open standards is
desirable and the community behind this desire is alive and kicking.

Netscape had been working on its own stylesheet language JavaScript Style
Sheet (JSSS) at that time and when it became clear that their proposal was
going to be turned down by the W3C in favour of CSS, they implemented the
CSS syntax into their already advanced though unfinished JSSS engine. (For
this reason CSS does not work at all in NS 4 when JavaScript is off).
Unfortunately the CSS implementation of NS 4.x turned out to be very poor.
In IE 4.0 Microsoft addressed some of the problems with CSS and IE 3.0,
but the new module responsible for displaying CSS (code-named "Trident")
was also not completely in line with the W3Cs recommendation.
Then someone got together and said well this is the new standard, and
RATHER than using something that was already used on 90% of the worlds
browsers.

Someone was together already and Microsoft's own Thomas Reardon was among
the participants.
They decided it would be best to define things differently,
thusly fucking everything up.

The CSS recommendation unfucked rather than fucked. If the W3Cs work had
been so bad

a) Microsoft would not have moved in their direction

and/or

b) the Web community and free developers would not have moved in their
direction.


Regards
David
 
M

Michael Jaeger

David said:
Most modern browsers have two rendering modes. The Quirks mode render
HTML like old browsers (i.e. Netscape 4, Internet Explorer 4/5). In
standard mode they render the page adhering to W3C recommendations.
The use of standard mode ist triggered by the presence of a document
type declaration (i.e. <!DOCTYPE html PUBLIC "-//W3C//DTD HTML
4.01//EN" "http://www.w3.org/TR/html4/DTD/strict.dtd">).

see: http://gutfeldt.ch/matthias/articles/doctypeswitch.html
see also:
http://www.carsten-protsch.de/zwischennetz/doctype/einleitung.html

David, Whitecrest,

thanks for your helpful explanations. I will check the links right away
to gain some deeper insight into the matter.

Mike
 
J

Jukka K. Korpela

David Christopher Weichert said:
Most modern browsers have two rendering modes.

Well, that's what they say, without actually describing the differences
or even the exact conditions of triggering them. In reality, they have
different modes, and the doctype sniffing foolishness is just one
feature, possibly with more than two alternatives.
The Quirks mode render
HTML like old browsers (i.e. Netscape 4, Internet Explorer 4/5).

No, it just means that newer browsers intentionally imitate _some_ of the
erroneous behavior of the older browsers.
In standard mode they render the page adhering to W3C recommendations.

That's what they might want us to believe, but in reality, "standard"
mode only means that the browser does not intentionally misbehave the way
that they do "Quirks" mode.
The use of standard mode ist triggered by the presence of a document
type declaration (i.e. <!DOCTYPE html PUBLIC "-//W3C//DTD HTML
4.01//EN"
"http://www.w3.org/TR/html4/DTD/strict.dtd">).

Most probably, but that's not the only case.

Well, _there_ you can find some detailed information on the conditions of
triggering the intentional errors (aka "Quirks mode").

But unfortunately there is no good compilation of _what_ the "Quirks
mode" _causes_ in each browser. It has even been said, almost
authoritatively, that the "Quirks mode" _should not_ be documented!

A rule of thumb: If you get an old document, do _not_ change its DOCTYPE
declaration to one that may trigger "standard mode". When you write new
documents, use valid markup according to specifications unless you really
know what you're doing, and use a magic incantation that triggers
"standard mode".

As an example, if a document has used the nonstandard
<table height="..."> construct, the layout will fall apart in most
browsing situations if you add a standard DOCTYPE _or_ a DOCTYPE
declaration that refers to a customized DTD.

(Don't try to make sense of it. There's no rational reason why a browser
should stop interpreting nonstandard markup that it knows well, just
because a document incorrectly claims conformance to HTML 4.01 syntax,
i.e. claims that the nonstandard attribute isn't there, _or_ refers to a
DTD that describes the syntax used.)
 
D

David Christopher Weichert

Thank you for the corrections Jukka. I'm always impressed with the
accuracy of your answers. Your erudition puts me to shame.


Kind regards
David
 
J

Jeff Thies

But unfortunately there is no good compilation of _what_ the "Quirks
mode" _causes_ in each browser. It has even been said, almost
authoritatively, that the "Quirks mode" _should not_ be documented!

A rule of thumb: If you get an old document, do _not_ change its DOCTYPE
declaration to one that may trigger "standard mode". When you write new
documents, use valid markup according to specifications unless you really
know what you're doing, and use a magic incantation that triggers
"standard mode".

As an example, if a document has used the nonstandard
<table height="..."> construct, the layout will fall apart in most
browsing situations if you add a standard DOCTYPE _or_ a DOCTYPE
declaration that refers to a customized DTD.

Is that about the worst of it? (The table height, which I've never used).
The quirks mode documentation I've read makes little sense to me. This
really seems to be mostly abourt satsifying IE5 in a few odd circumstances.
THe Netscape and Opera quirks mode seem even more arcane.

Jeff
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,756
Messages
2,569,534
Members
45,007
Latest member
OrderFitnessKetoCapsules

Latest Threads

Top