Last time I detailed a bit about the Limited Profile, one of Ion’s more advanced and complex Profile options. Today I’ll talk about Ion’s Adaptive Quirks Profile, which is the default and most commonly-used profile in Ion’s arsenal.
The Adaptive Quirks Profile, at a high level, is our answer to complex legacy web application environments, many of which were started during the IE6 days and built upon for years after. Parts of old web applications are often updated or rewritten over time even as other parts of the application remained unchanged. The updated pages may simply have been written out by newer tools that knew about newer standards and browsers like Firefox or IE7 and as a result those pages were stamped with more modern web standard declarative statements. The results is that many legacy web applications tend to be a mish-mash of IE6- and IE7-era web pages, all being served up by the same root web application.
The way that any browser decides which layout engine to use or which standards bodies to adhere to when it renders your site can be complex, and IE8 and IE9 are no exception. Even IE10, currently in development, is not immune: Last year Microsoft blogged about a new legacy quirks mode that IE10 will be supporting.
When we were developing Ion last year, we found that this problem (a single legacy web application that serves up a mish-mash of IE6- and IE7-era pages) to be more common than expected. This made configuring Ion potentially painful: customers evaluating Ion had to consider writing multiple rules for a single web application because it switched in and out of legacy and modern standards modes so frequently.
Our answer to this is our Adaptive Quirks Profile. Think of it as a smart profile: before it actually renders a web page, it sniffs the page to see if it was written as an IE6 (or older) page or whether it may understand what IE7 is, and then loads the correct layout engine for that page dynamically. This means that a single rule and profile within Ion can handle these complicated web applications with relative ease.
For the technically curious, here’s the decision tree that details which legacy IE engine Ion will load, depending on how a site is written. If you’re not familiar with DOCTYPE declarations for web pages, Wikipedia‘s DOCTYPE article is a great place to start reading.
Decision point #1: Does the page have a DOCTYPE declaration? If not, it’s considered to be a legacy page and Ion will load the page using the Quirks settings. If the page does have a DOCTYPE, we go on to decision point #2…
Decision point #2: Is the DOCTYPE in the correct location in the page? (the DOCTYPE must be first) If not, it’s considered to be a legacy page and Ion will load the page using the Quirks settings. If the page does have a DOCTYPE in the correct position, we go on to decision point #3…
Decision point #3: Does the DOCTYPE (which is in the correct place) declare itself as QUIRKS? If so, Ion will load the page using the Quirks setting. If not, Ion loads the page using IE7 settings (specifically IE7 Standards Mode).
For those of you who learn visually, here’s a flowchart detailing the decision tree:
As a result, Ion can achieve the maximum compatibility with legacy web applications even if individual pages within the application switch in and out of legacy standards modes. I have to admit that this kind of thing is more than anyone really wants to know about when they’re dealing with web application compatibility, and that’s why we wrote Ion: so you really don’t have to.
One final point of emphasis: I want to remind our readers that we did not write a new layout engine in Ion. Our Adaptive Quirks Profile is not some Browsium-authored technology. What Ion is doing is intelligently directing IE8 or IE9 to render content using layout modes that they already support. We just do it in a way that’s a lot smarter and easier to manage than you might otherwise have available to you.