Implementing the meta switch on IIS

Source: Internet
Author: User

Http://msdn.microsoft.com/en-us/library/cc817572.aspx

 

 

Windows Internet Explorer 8 introduces document compatibility modes that allow Web developers to tell the browser to render their pages in the same way as older versions wowould. the compatibility mode can be specified on a per-page or per-site basis.

This document describes how to implement a very common document compatibility mode,Emulateie7, Supported by Windows Internet Explorer 8, on a per-site basis, using custom headers in Internet Information Services (IIS ).

For more information concerning the different compatibility modes supported by Windows Internet Explorer 8 and how to implement them on a per-page basis, see meta tags and locking in future compatibility.

Specifying custom HTTP Response Headers

A document mode can be specified for your web site by defining a custom header for the site using IIS Web server. To enable Microsoft IIS to define a custom HTTP Response Header that automatically renders all pages inEmulateie7Mode, you can use the following web. config example.

XML Copy
<?xml version="1.0" encoding="utf-8"?><configuration>   <system.webServer>      

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

  1. Click Start, click Administrative Tools, and then click Internet Information Services (IIS) manager.
  2. In the connections pane, expand the node for the server, and then expand.
  3. Click the Web site where you want to add the custom HTTP Response Header.
  4. In the web site pane, double-click in the Section.
  5. Under actions, click Add.
  6. In the Name box, type X-UA-compatible.
  7. In the value box, type Ie = emulateie7.
  8. Click OK.

To configure IIS 6 and earlier versions to include a custom HTTP Response Header, follow these steps:

  1. Click Start, click Run, type inetmgr.exe, and then click OK.
  2. Expand the server you want and then expand web sites.
  3. Right-click the web site you want and then click Properties.
  4. Click the HTTP headers tab.
  5. Under custom HTTP headers, click Add.
  6. In the custom header name box, type X-UA-compatible.
  7. In the custom Header Value box, type Ie = emulateie7.
  8. Click OK two times.

If you specify a default document compatibility mode using your web server, you can override that setting by specifying a different document compatibility mode in a specific web page. the mode specified within the web page takes precedence over the mode specified by the server.

Custom HTTP Response Headers and other Web Servers

For more information about Windows Internet Explorer 8 Document compatibility modes and Apache Web servers, read implementing the meta switch on Apache.

 

 

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.