Skip to content Skip to sidebar Skip to footer

Internet Explorer 9 Will Not Recognize Doctype Sent By Servlet From Weblogic Server And Renders In Document Mode Ie7 - Extra Characters Before Start?

PROBLEM Internet Explorer 9 does not take the into account in the same way when I have my page locally or on my server. I made a simple test page to highlight

Solution 1:

IE may have some configuration settings that override <!doctype html> in the markup. As per https://msdn.microsoft.com/en-us/library/ie/jj676914(v=vs.85).aspx:

Pages opened in the Intranet zone might be treated differently, depending on the configuration of the browser, the presence of group policy options, and other factors.

Try to check places listed in the article above.

In addition to that, you can try to force document compatibility mode using either X-UA-Compatible HTTP header or <meta> tag as per https://msdn.microsoft.com/en-us/library/ie/jj676913(v=vs.85).aspx

In some nasty cases when a standards compliant page is loaded inside an iframe hosted by a quirks page it may be required to reload the iframe to force it to the right document mode.

Please note that once IE starts rendering the page the document mode is finalized and can't be changed on the fly. Thus, every instruction on the document mode has to appear as early as it can. For example, as you already mentioned, <!doctype html> has to be the very 1st line, <meta> with X-UA-Compatible has to be the very 1st tag in the <head>. I'd say if you have control over the server side use HTTP header instead of <meta> to make sure it switches document mode before any rendering happens.

Post a Comment for "Internet Explorer 9 Will Not Recognize Doctype Sent By Servlet From Weblogic Server And Renders In Document Mode Ie7 - Extra Characters Before Start?"