Rendering modes in modern browsers
Looks like we’ve all been doing very well lately. I haven’t spent two sleepless nights like Ienik thanks to a fine distribution, but the day is still young, and Rudánek and I are already looking forward to getting two instances of an unnamed application server running. On top of that, I got a good telling-off today for daring to use OR in an SQL statement instead of NVL. Of course, the fool that I am, I didn’t know it would completely knock out the indexes and slow the database response. Now all I need is for somebody to drop a weight on my foot at the gym, and I’ll seriously start thinking about a vacation.
This post is neither a complaint nor a lament. It’s to draw my colleagues’ attention to some peculiar browser behavior. Modern browsers such as Mozilla 1.0 and later (Netscape 6.0 and later, and all Gecko-based browsers), Internet Explorer 6.0 and 5.0 for Mac, and Opera 7.0 have a special mode for rendering pages. The idea is to let browsers show pages that don’t quite follow the standards, and to maintain backward compatibility. Pages that displayed correctly in older browsers shouldn’t fall apart in newer ones just because the rendering engine is much stricter.
That’s why the modes were introduced. Typically there is standards mode, where standards are followed strictly, and quirks mode. The browser switches between the modes based on the page’s DTD. For example, in Opera 7.0’s quirks mode, the height attribute on a tr element is processed and displayed even though it isn’t correct according to the HTML standard. In standards mode it isn’t interpreted.
You can find more about the various modes and browsers in Petr Staníček’s article . One thing you won’t find there, because the article is a little older, is what Opera 7.0 does. You’ll find that on its own website.
Related articles
Related CZ Podcast episodes
- #217 · Ivo Lukačovič
On Windy, JavaScript and building companies. · Czech audio
- #3 · Java 6 SE, Vývoj webových aplikací
Dagi and Filemon discuss Java 6 and web application frameworks. · Czech audio