Tuesday, March 24, 2009

IE8 Released

Microsoft finally released Internet Explorer 8. It's pretty close to IE7, but is more standards compliant. We've ran into a couple of clients that have some old IE6 and IE7 compatibility issues when rendering since some hacks were put in to deal with IE7 way back when.... In a pinch we enabled the IE7 compatibility mode on the website so it would work for them without any redesign and they've been quite happy with the results - everything renders just fine. So I would say go ahead, IE8 has my stamp of approval for anybody that wants to install it.

Just incase anybody wants to know the compatibility mode settings, I've summarzied them below (for you other web developers out there). There are essentially 3 ways to turn on compatability mode without any user interaction: Per Web Page, Per Web Application, or Per Web Site...

Per Web Page works like the following example:



<html>
<head>
<!-- Mimic Internet Explorer 7 -->
<title>My Web Page</title>
<meta http-equiv="X-UA-Compatible" content="IE=EmulateIE7" />
</head>
<body>
<p>Content goes here.</p>
</body>
</html>




Per Web Application works like the following web.config file example:



<?xml version="1.0" encoding="utf-8"?>
<configuration>
<system.webServer>
<httpProtocol>
<customHeaders>
<clear />
<add name="X-UA-Compatible" value="IE=EmulateIE7" />
</customHeaders>
</httpProtocol>
</system.webServer>
</configuration>





Per Web Site works like the following (just change your IIS/Apache settings)



You can also configure IIS 7 on a Windows Server 2008-based computer to include a custom HTTP response header by following these steps:

Click Start, click Administrative Tools, and then click Internet Information Services (IIS) Manager.
In the connections pane, expand the node for the server, and then expand .
Click the Web site where you want to add the custom HTTP response header.
In the Web site pane, double-click in the section.
Under Actions, click Add.
In the Name box, type X-UA-Compatible.
In the Value box, type IE=EmulateIE7.
Click OK.
To configure IIS 6 and earlier versions to include a custom HTTP response header, follow these steps:

Click Start, click Run, type inetmgr.exe, and then click OK.
Expand the server you want and then expand Web Sites.
Right-click the Web site you want and then click Properties.
Click the HTTP Headers tab.
Under Custom HTTP headers, click Add.
In the Custom header name box, type X-UA-Compatible.
In the Custom header value box, type IE=EmulateIE7.
Click OK two times.




Apache Administrators would do the following:



Apache 2.2
To specify an HTTP response header for your Web site using Apache 2.2, you can use the Header directive provided by the mod_headers module. The Header directive can occur almost anywhere within the various configuration files, but the main configuration file is httpd.conf. It can be limited in scope by enclosing them in configuration sections such as , , , and .

By placing the directive in httpd.conf, all pages sent by your server within that scope will include the X-UA-Compatible HTTP response header. This will force Windows Internet Explorer 8 to use the EmulateIE7mode when rendering your pages.

First, you need to ensure that the headers_module is loaded during server initialization. In the httpd.conf file, uncomment the line by removing the “#” at the start of the LoadModule line for headers_module. You can use a text editor such as Notepad to do this. When complete, it should read as below.

LoadModule headers_module modules/mod_headers.so

To add the header to all pages on the server, add the following line to the httpd.conf file after the LoadModule lines.

Header set X-UA-Compatible “IE=EmulateIE7”

It may not be desirable to apply the header to every page on the server. The directive can be used to change the configuration for content in the Web space, relative to the document root. For example, the following configuration applies the HTTP header to any URL-path that begins in /store. It will apply to requests for http://yoursite.com/store and http://yoursite.com/store/file.html as well any other requests beginning with the /store string.

<Location /store>
Header set X-UA-Compatible “IE=EmulateIE7”
</Location>


No comments: