0

I create HTA (HTML application) by default it uses Internet Explorer 9.0 but I need Internet Explorer 7.0. I tried write:

<meta http-equiv="x-ua-compatible" content="IE=7">

but it doesn't work!

Poul Bak
  • 7,390
  • 4
  • 20
  • 40
Aimon Z.
  • 39
  • 1
  • 7
  • 1
    Can you show any proofs that the meta tag "doesn't work"? Depending on the installed version, emulating earlier versions is more or less accurate, because some features are totally removed from newer versions. Also, a DTD is needed, in the case of emulating IE7, use a HTML4 document type declaration, though a HTML5 DTD should work too. See [Specifying legacy document modes](https://docs.microsoft.com/en-us/previous-versions/windows/internet-explorer/ie-developer/compatibility/jj676915%28v%3dvs.85%29) at MSDN. See also [this answer](https://stackoverflow.com/a/19570684/1169519). – Teemu Oct 15 '18 at 04:24
  • This screenshot: https://i.imgur.com/YjDqOnP.png – Aimon Z. Oct 15 '18 at 12:03
  • The HTML lacks the DTD, please read my answer linked in my previous comment. It is also possible to detect the real browser version despite of downgrading the document mode. – Teemu Oct 15 '18 at 14:20
  • I tried to add a DTD, but it also does not work. – Aimon Z. Oct 15 '18 at 15:31
  • A quick peek to the userAgent reveals, that there's enough information to detect real IE version despite of the document mode. When set to IE7, the text contains "compatible; MSIE 7.0", but the Trident version number still exposes the real IE version. So, you can't obfuscate the real browser version by changing document mode. – Teemu Oct 15 '18 at 17:04

1 Answers1

0

try:

<meta http-equiv="x-ua-compatible" content="IE=7">

or other versions :

<meta http-equiv="x-ua-compatible" content="IE=8">

or

<meta http-equiv="x-ua-compatible" content="IE=9">

or

<meta http-equiv="x-ua-compatible" content="IE=10">

or

<meta http-equiv="x-ua-compatible" content="IE=edge"> 
  • test it with a css for example use rounded corners for buttons. in ie=9 you will see the rounded corners, in ie=7 the rounded corners will be ignored. you are changing the browser "graphic engine" . not the user-agent – David Nemec Oct 15 '18 at 20:46