开发者

How to update website for compatibility with Internet Explorer 9?

开发者 https://www.devze.com 2023-02-18 11:42 出处:网络
when I launched my site within Internet Explorer 9 I began receiving script error messages. I read the support for Internet Explorer and found out that because some sites are designed for older browse

when I launched my site within Internet Explorer 9 I began receiving script error messages. I read the support for Internet Explorer and found out that because some sites are designed for older browsers there'll be compatibility issues until the sites are updated for Internet Explorer 9.

I found that I could add this code :

    void Application_BeginRequest()  
{
        Response.AppendHeader("X-UA-Compatible", "IE=EmulateIE8"); 
}

to the Global.asax file to deal with the iss开发者_如何学Cue. The errors I received were from IE9.

EDIT: The errors were fixed but I want to know if there is an alternative method to making a website compatible with IE9? Also what are the differences between the way IE8 interprets Javascript code and IE9?


What you did is correct. This is one of the server side way to handle this. Alternately, you can set this in HTML header (will be painful as you have to do it for all the pages)

On a related note - read the IE compatibility blog which has more details on this topic:

http://blogs.msdn.com/b/ie/archive/2010/06/16/ie-s-compatibility-features-for-site-developers.aspx

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号