We have an intranet site and I want to ignore the IE's compatibility mode when "display intranet sites in compatibility view" is checked. I have come across various solutions to forcefully set IE's compatibility mode off.
I have tried
<meta http-equiv="X-UA-Compatible" content="IE=Edge" />
and
<!DOCTYPE html>
I even added the header as
response.AddHeader("X-UA-Compatible", "IE=edge");
But when i am visiting the page from my office's network the page is still running on the compatible mode and the request header is like
Mozilla/4.0 (compatible; MSIE 7.0... )
But when I am visiting the page from my home network then the IE's compatibility mode is off.
The request header is
User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; Trident/7.0; Touch; rv:11.0) like Gecko
I have tried so many solutions in the code suggested in different forums but the compatibility mode is only on when using the office's network. I am wondering is it something to do with the office Network's settings and cannot be controlled from code?.
Any suggestions or help would be appreciated. I have spend the whole day on this and when I use my home network then the issue seems to be gone. I am not sure if this is something to do with the code or not.
Thanks in advance.
In my opinion, the issue is related that you site belongs to the Local Intranet Zone. When you access the site from the office's network, it will mapped to the Local Intranet Zone.
So, when you checked the "display intranet sites in compatibility view" options and access the site from office's network, the site will in the compatibility mode. You could try to uncheck this option to disable the Compatibility View / Mode. Also, you could try to disable Local Intranet Zone.
More details, please refer to The Intranet Zone and How to turn off compatibility View / Mode in Microsoft IE10 and IE11