Is it possible to force IE to use IE5 quirks mode?
Asked Answered
H

1

8

I have this question and this one and also this one. Unfortunately it appears that they do not work for me.

I've also looked at the Microsoft docs, to no avail.

I have tried a couple of things.

I added <meta http-equiv="X-UA-Compatible" content="IE=5"> to my head. I added <!DOCTYPE html> to the beginning of my document along with the meta tag. Still no dice. The only thing that happens is it goes into Document Mode: Quirks:

Quirky

However, this does not work. My page is broken. But when I select IE5 quirks:

5 times as quirky!

Everything works. For whatever value of works actually renders the page.

Though, things are a little bit more bizarre, because the page works just fine in Chrome and Firefox.

Oh, wow. Apparently it also works with

IE8 Standards???

IE8 standards.

Changing it to content="IE=8" or content="IE=EmulateIE8" also appears not to work.

What am I doing wrong??

Hetti answered 3/2, 2015 at 20:26 Comment(10)
why would you WANT to support IE5? supporting IE6 is like shooting yourself in the head. supporting IE5 is nuking the entire city you're in.Scotopia
It's not so much as supporting IE5 as the people who wrote this horrible, horrible page wrote it in such a way that apparently wonky versions of IE are the only way it will work (in IE) and I just want it to work without having to dive further into the darkness/yak fur. It's possible that it's one of the eleventythouzillion lines of the worst Javascript in existence, and they're targeting IE or something. I'm not sure. It's pretty much the worst.Hetti
my condolences....Scotopia
Just remove the DTD and all X-UA metas, and there you have it, approximately. Some features have been removed from newer IEs, for example createStyleSheet(), totally. No emulation mode can bring them back.Stagey
@Stagey that's what I had before. That produces IE10 quirks which, sadly is one of those configurations that does not work.Hetti
@Marc B: I have faith that nobody in their right mind will want to support IE5 anymore in this day and age. Sympathy should be the default response going forward, unless otherwise proven.Dominicadominical
As for the question itself... I don't imagine much else can be done besides throwing stuff at the wall and seeing what sticks. But FWIW, if the page works just fine in other browsers then it's likely that there are swathes of IE-specific code that are confusing newer versions of IE. Thank heavens for Project Spartan...Dominicadominical
@Dominicadominical That's my guess as well - we have horribly outdated versions of questionable libraries... and worst of all is that other pages do not have the same problem, so there's probably some monkeying going on with this very specific case. FML.Hetti
What happens if you disable JS on that particular page?Dominicadominical
@Dominicadominical then assuredly nothing would show up. The architecture that I'm dealing with was mainframe/cobol/rpg/greenscreen developers writing mainframe/cobol/rpg code in a different syntax. Same (horrible) paradigms. Such as making an AJAX request that returns HTML that Javascript injects into the DOM. Or not, in this case. With the added bonus of failing totally silently.Hetti
T
4

Leave the DTD off and add the following in the <head>:

<meta http-equiv="X-UA-Compatible" content="IE=5">

From http://www.nczonline.net/blog/2010/01/19/internet-explorer-8-document-and-browser-modes/

Tested as working in IE11 on Win 8.1 and IE10 on Win 7.

Trin answered 5/2, 2015 at 14:9 Comment(2)
Sorry, I don't know how I didn't see that. However, I tested it and it definitely says "IE5 Quirks" when I did this in IE10 on Windows 7. I just used a simple, basic HTML file.Trin
Okay apparently this has to come first in the <head> section - or at least before the rest of the abomination that I have to deal with. Ugh this code sucks.Hetti

© 2022 - 2024 — McMap. All rights reserved.