Add IE Edge meta tag after header tag from ASP include

I have thousands of pages on a CMS site that do not display well from within the company network because IE treats them as intranet pages, and the default setting for IE is to display intranet pages in compatibility mode.

I want to insert the IE Edge meta tag after the title tag to force the browser to enter its latest version, but I cannot edit every page for this. To avoid editing individual pages or the need to regenerate pages in the CMS, I think I will need to update the include, which is common to all pages with the server side of the script that does this. Is it possible? I think it should be server-side, because adding a meta tag on onload does not force browser mode, but maybe I'm wrong.

So I want this:

<head>
...some stuff...
<title>My Title</title>
...some other stuff...
<!--#include virtual="/myinclude.asp"-->
</head>

To become the following:

<head>
...some stuff...
<title>My Title</title>
<meta http-equiv="X-UA-Compatible" content="IE=Edge,chrome=1">
...some other stuff...
...rendered include...
</head>

Is there any way to do this? Or some other workaround that I don't see?

+4
source share
2

, :

<%  Response.AddHeader "CustomHeader","CustomValue" %>

, , , include, . :

<% Response.AddHeader "X-UA-Compatible","IE=Edge,chrome=1" %>

! spec:

http://msdn.microsoft.com/en-us/library/ms524327(v=vs.90).aspx

+3

IIS . MSDN :

HTTP- EmulateIE7 IIS7 ( )

  • IIS.
  • " HTTP" " "
  • ""
  • "X-UA-Compatible" "IE = Edge"

.

IIS Blog .

Emulate IE8 mode  -->   IE=EmulateIE8
Emulate IE7 mode  -->   IE=EmulateIE7
IE5 mode          -->   IE=5
IE7 mode          -->   IE=7.5
IE8 mode          -->   IE=8
Edge mode         -->   IE=Edge
+2

All Articles