Main web page in standard mode, iframe in compatibility mode: any issues? Main web page in standard mode, iframe in compatibility mode: any issues? javascript javascript

Main web page in standard mode, iframe in compatibility mode: any issues?


As of IE9 mode, webpages cannot display multiple document modes. For example, consider a standards-based webpage that contains a frameelement that displays content in quirks mode. IE9 mode displays thechild frame in standards mode (because the parent document is instandards mode).

According to my tests, this is not true; my sampleworks as desired in IE9: the main page is in standard mode, the framepage is in quirk mode.

Not quite; when your sample works as desired it's actually displayed in a single display mode, with quirks mode emulated for the frame content. You shouldn't care about the underlying mechanics as long as the resulting output matches what you were after, although there is some anecdotal evidence of differences between emulated and native modes (mostly to do with js DOM manipulation).

I'd be a bit more concerned about how IE10+ would handle such fringe scenarios:

Starting with IE11 Preview, document modes are deprecated and shouldno longer be used, except on a temporary basis. Make sure to updatesites that rely on legacy features and document modes to reflectmodern standards.

Ninja edit: looks like this has already been resolved on SO; modifying the accepted solution to your needs you should omit Doctype and add <meta http-equiv="X-UA-Compatible" content="IE=5" />; X-UA-Compatibility correctly defined as per msdn spec


This is a pseudo-answer to your slightly non-specific question;

In regards to your apprehension to rely on this IE feature for "back-compatibility", I feel the same way. Microsoft has provided this option because there are lots of companies out there who take a long time to update their web content. This option is meant to allow them to have a quick and dirty stop-gap, not a permanent solution.

So, what's the permanent solution? If that is your question, then IMO this is the answer; don't rely on the stop-gap and develop the correct output for the reports.

Without knowing what those reports are it is impossible to properly advise you on that part, but here's a stab in the dark:

There are lots of options to convert "HTML" to PDF. (I put HTML in quotations because each rendering engine is bound to require different versions/standards of HTML and you'll need to know those assumptions before you pick one.) If you want output that will format 100% the same on any browser, then you want a format that is meant to be static and not change; like PDF. Plus, then you also have the printing options taken care of as well.