简体   繁体   中英

IE9 - Quirks Mode and <jsp:include>

after trying every doctype and meta-tag recommended, I couldn't figure out how to disable quirks mode on IE9.

The project has a main jsp and renders dynamically inside of it using .

When I an onkeypress event is fired I get a "HTML1113: Document mode restart from Quirks to IE9 Standards".

I tried using this on every jps, but no luck:

<!doctype html>
<html>
<head>
<meta http-equiv="x-ua-compatible" content="IE=Edge"/> 
</head>
...

Maybe the jsp:include implementation uses iframe, in which case I'll never get rid of the quirks mode, or that is what understand about the demonstration in this post Will an iframe render in quirks mode?

Thanks.

Sorry to pass this on but the main/containing page is the only one that can fully determine both the browser mode and the document mode, quirks mode is IE7. So if jsp:include is indeed contained (which it looks like) then the only solution is to alter the main/containing page.

Phil

I'll bet that the page being included has another <html> block, ie it's a full page not just an html snippet. Obviously having 2 or 3 <html> blocks is a quirk .

I also faced the same issue. The only mistake that I did was I included the doctype and meta tag in both parent and child jsps which was causing the issue. Please remove them in child jsps, which was already included in parent jsp and keep it only in parent always which will solve this issue.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM