Search code examples
htmlinternet-exploreriframeinternet-explorer-9quirks-mode

IE9 - Is it possible to have a child Frame render in Edge (HTML5) while parent Frames are in Quirks mode?


I am working on an web project that is a parent container unfortunately made up of several framesets / frames (I have no control over this). The overall document mode is Quirks, since several of the peripheral frames use non-standard doctypes. I am working on a page that is going to be used in one of the frames that needs to have HTML5 enabled (<!doctype html>). However, IE9 is commenting out the doctype in this frame, and rendering it in Quirks also.

Is there any way for me to force this particular frame to render in HTML5 standards mode, while the parent container is still in Quirks mode?

EDIT: I found this StackOverflow question from 2012: iframe not rendering in ie9 mode when containing page is in quirks mode. Is this still the only possible solution? I really don't want to use this solution as using an <object> tag makes it very hard to debug with F12 dev tools (all that will be seen is just the <object> tag, and not the HTML contained within it.


Solution

  • If a document is loaded in Quirks mode, all of its iframes will be as well. For more information, please see 2.1.2.3 iframe Handling, as well as the following diagram:

    enter image description here

    With regards to the suggested work-around (using <object>), we're aware that debugging this approach can be difficult. You can however debug the same document in another tab for the time being. Please note the other serious limitations of that work-around in both the answer and the subsequent comments.