9

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??

Community
  • 1
  • 1
Wayne Werner
  • 49,299
  • 29
  • 200
  • 290
  • 5
    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. – Marc B Feb 03 '15 at 20:28
  • 5
    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. – Wayne Werner Feb 03 '15 at 20:32
  • 7
    my condolences.... – Marc B Feb 03 '15 at 20:34
  • 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. – Teemu Feb 04 '15 at 09:03
  • @Teemu that's what I had before. That produces IE10 quirks which, sadly is one of those configurations that does not work. – Wayne Werner Feb 04 '15 at 20:10
  • @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. – BoltClock Feb 05 '15 at 15:15
  • 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... – BoltClock Feb 05 '15 at 15:25
  • @BoltClock 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. – Wayne Werner Feb 05 '15 at 15:40
  • What happens if you disable JS on that particular page? – BoltClock Feb 05 '15 at 15:43
  • @BoltClock 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. – Wayne Werner Feb 05 '15 at 15:47

1 Answers1

5

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.

Joshua Whitley
  • 1,196
  • 7
  • 21
  • 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. – Joshua Whitley Feb 05 '15 at 15:46
  • 3
    Okay apparently this has to come first in the `` section - or at least before the rest of the abomination that I have to deal with. Ugh this code sucks. – Wayne Werner Feb 05 '15 at 15:58