I want to force user IE10 browser to always use IE8 as compatible mode on rendering and feature. I have tried to add meta tag and also response header via web.config.
Both working fine if I test using IE in virtual machine, to connect to my machine. However, it doesn't work "100%" if connect via remote computer. Some callback would failed.
Also, by checking browser / document mode, found that only document mode turned to IE 8 mode. Browser mode still show IE10 standard. If I change it manually to IE8, it working fine.
When using the <meta> tag you need to ensure that it is the first element within your <head> tag (apparently it can make a difference, especially if it comes after any style sheet declarations) :
<head>
<meta http-equiv="X-UA-Compatible" content="IE=8" />
<!-- Other <head> contents here -->
</head>
as opposed to the emulate version (which apparently will only mimic IE-8, which may be your browser mode issue) :
and as you mentioned in your web.config, although I found a slightly different implementation, which may not make a difference but might be worth trying :
I don't think this will work in all situations (certainly not 100% as I am sure you know). I suppose if you can get Emulate-IE8 to work, that may be as close as you will get, especially since you are running IE10 (as you mentioned). Do
you have any specific reason to target IE8?
You can find a huge discussion on the following Stack Overflow thread on this very topic :
What the X-UA-Compatible flag does is telling newer versions of IE to fall back into compatibility mode to emulate older versions. This means that IE9 or IE 10 will effectively throw away its newer features, in the name of trying to be backward compatible.
At the same time there are difference between IE 8 mode and Emulate IE 8 mode, and you could also learn relevant information from definition document compatibility.
Moreover, you could get more relevant information about Internet Explorer performance in our Internet Explorer Forum.
hope it helps you,
Kind regards
Please mark the replies as answers if they help or unmark if not.
Feedback to us
chanmy8
Member
25 Points
67 Posts
Force IE8 compatible mode by ASP.NET app
Jan 18, 2013 02:10 AM|LINK
Hi
I want to force user IE10 browser to always use IE8 as compatible mode on rendering and feature. I have tried to add meta tag and also response header via web.config.
<meta http-equiv="X-UA-Compatible" content="IE=EmulateIE8" >
<add name="X-UA-Compatible" value="IE=EmulateIE8"/>
Both working fine if I test using IE in virtual machine, to connect to my machine. However, it doesn't work "100%" if connect via remote computer. Some callback would failed.
Also, by checking browser / document mode, found that only document mode turned to IE 8 mode. Browser mode still show IE10 standard. If I change it manually to IE8, it working fine.
How could I force browser mode to IE8 as well?
Thank you
Rion William...
All-Star
27886 Points
4611 Posts
Re: Force IE8 compatible mode by ASP.NET app
Jan 18, 2013 02:31 AM|LINK
When using the <meta> tag you need to ensure that it is the first element within your <head> tag (apparently it can make a difference, especially if it comes after any style sheet declarations) :
as opposed to the emulate version (which apparently will only mimic IE-8, which may be your browser mode issue) :
and as you mentioned in your web.config, although I found a slightly different implementation, which may not make a difference but might be worth trying :
<httpProtocol> <customHeaders> <add name="X-UA-Compatible" value="IE=8"/> </customHeaders> </httpProtocol>chanmy8
Member
25 Points
67 Posts
Re: Force IE8 compatible mode by ASP.NET app
Jan 18, 2013 03:01 AM|LINK
Hi
I have tried to add meta tag as below just after <head>. It still doesn't work unless i put EmulateIE8.
For response header, nomatter what I put, IE=8 or IE=EmulateIE8 also not working.Rion William...
All-Star
27886 Points
4611 Posts
Re: Force IE8 compatible mode by ASP.NET app
Jan 18, 2013 03:16 AM|LINK
I don't think this will work in all situations (certainly not 100% as I am sure you know). I suppose if you can get Emulate-IE8 to work, that may be as close as you will get, especially since you are running IE10 (as you mentioned). Do you have any specific reason to target IE8?
You can find a huge discussion on the following Stack Overflow thread on this very topic :
Using <meta http-equiv="X-UA-Compatible"> tags in Internet Explorer
Are you using the recommended document type tag at the top of your pages (It might make no difference at all) :
MSDN documents regarding specifying legacy document modes (exactly what you are doing here)
Angie xu - M...
All-Star
18664 Points
1590 Posts
Microsoft
Re: Force IE8 compatible mode by ASP.NET app
Jan 23, 2013 08:51 AM|LINK
Hi chanmy
What the X-UA-Compatible flag does is telling newer versions of IE to fall back into compatibility mode to emulate older versions. This means that IE9 or IE 10 will effectively throw away its newer features, in the name of trying to be backward compatible.
At the same time there are difference between IE 8 mode and Emulate IE 8 mode, and you could also learn relevant information from definition document compatibility.
Moreover, you could get more relevant information about Internet Explorer performance in our Internet Explorer Forum.
hope it helps you,
Kind regards
Feedback to us
Develop and promote your apps in Windows Store
chanmy8
Member
25 Points
67 Posts
Re: Force IE8 compatible mode by ASP.NET app
Jan 23, 2013 08:55 AM|LINK
Hi
Thank you for reply.
Finally I found the root cause,
http://www.hanselman.com/blog/BugAndFixASPNETFailsToDetectIE10CausingDoPostBackIsUndefinedJavaScriptErrorOrMaintainFF5ScrollbarPosition.aspx
http://support.microsoft.com/kb/2600100