When I recently developed an ASP. NET web Report for the customer, I found that it is always strange to view webpages on the customer's IE 8 browser.
After investigation, we found that the customer's IE 8 browser was set to "use Compatibility View for local network. (The customer's company has a windows domain and normal users cannot change many windows configurations ).
After careful analysis, since all users on the client side are IE8, there is no need to use the IE8 compatibility mode to simulate IE6.
The customer's company may use this configuration to make the old Web system developed/debugged Based on ie6.
Now we are developing new software. All users use IE8 and there is no need to consider the compatibility of IE6. We only need to tell the customer's browser to use IE8 standard mode.
I tried to add
<Meta http-equiv = "X-UA-Compatible" content = "IE = edge, chrome = 1"/>
<Meta http-equiv = "X-UA-Compatible" content = "IE = 8"/>
All of the above are invalid.
After checking google, we found that in the background Code, setting the response Header "X-UA-Compatible" parameter can work properly:
Public class TestHander: IHttpHandler {public void ProcessRequest (HttpContext context) {HttpResponse res = context. response; // for compatibility view setttings in IE8, res is useful for any settings. addHeader ("X-UA-Compatible", "IE = 8 ");...}...}
Take notes to avoid forgetting and sharing with them.
------------- Reprinted please indicate the source: http://www.cnblogs.com/jacklondon
------------- Welcome to download the trial of the Single Sign-on system, http://zheguisoft.com