iEntry 10th Anniversary Forum Rules Search
WebProWorld
Register FAQ Calendar Mark Forums Read
Web Programming Discussion Forum Working with an API? Developing a plugin? Writing a Mod or script for your favorite blog, Web 2.0 site or Forum? Welcome.

Share Thread: & Tags

Share Thread:

Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 03-24-2009, 12:20 PM
wige's Avatar
Moderator
WebProWorld Moderator
 
Join Date: Jun 2006
Location: United States
Posts: 2,661
wige RepRank 9wige RepRank 9wige RepRank 9wige RepRank 9wige RepRank 9wige RepRank 9wige RepRank 9wige RepRank 9wige RepRank 9wige RepRank 9wige RepRank 9
Default Configuring Servers for Internet Explorer 8

Microsoft Internet Explorer 8 is designed to be more standards compliant than previous versions. As a result, certain hacks in web sites can cause those sites to display incorrectly in Internet Explorer 8. This can be addressed by forcing browsers to render your site in what is called "compatibility mode". The following instructions detail how to enable compatibility mode site wide, if your site is hosted on an Apache server.

Setting Compatibility Mode for all visitors on Apache

Enabling compatibility mode on an Apache server requires the ability to create and edit .htaccess files, and mod_headers must be installed on the server. Most shared and dedicated hosting plans should allow this.

Simply add the following line to your .htaccess file.
Code:
Header set X-UA-Compatible "IE=EmulateIE7"
Setting Compatibility Mode for everyone but the webmaster

If you will be testing your site, and want your own browser to work without compatibility mode, you can specify certain IP addresses that will not be shown the header.

First, create a list of IP addresses that should not have compatibility mode. Add the following line to the .htaccess file, changing 1.2.3.4 to the appropriate address. Each IP address would require a seperate line.
Code:
SetEnvIf Remote_Addr 1.2.3.4 webmaster
This assigns the code "webmaster" to each specified IP address. Now, you would add the compatability header, telling it to display if the visitor has not been given the "webmaster" code. This is done by adding the following line to the .htaccess file after the lines you added above.

Code:
Header set X-UA-Compatible "IE=EmulateIE7" env=!webmaster
Everyone not from the specified IP address will be put in compatibility mode by default. Those visiting the site from the specified IP address(es) can enable compatibility if they want, but it will be disabled by default.

Setting Compatibility Mode on IIS 7
If you have administrative access to your IIS server, you can add new headers by following the instructions here: IIS 7.0: Add a Custom HTTP Response Header

The name you need to specify is "X-UA-Compatible" and the value is "IE=EmulateIE7" (without the quotes).

Setting Compatibility Mode on other platforms
If you can not use the above method for any reason, you can add compatibility mode to each page by adding the following meta tag:
<meta http-equiv="X-UA-Compatible" content="IE=EmulateIE7" />
__________________
The best way to learn anything, is to question everything.
Reply With Quote
  #2 (permalink)  
Old 03-25-2009, 11:56 AM
kgun's Avatar
WebProWorld 1,000+ Club
WebProWorld MVP
 
Join Date: May 2005
Location: Norway
Posts: 5,723
kgun RepRank 10kgun RepRank 10kgun RepRank 10kgun RepRank 10kgun RepRank 10kgun RepRank 10kgun RepRank 10kgun RepRank 10kgun RepRank 10kgun RepRank 10kgun RepRank 10
Default Re: Configuring Servers for Internet Explorer 8

Quote:
Originally Posted by wige View Post
Microsoft Internet Explorer 8 is designed to be more standards compliant than previous versions. As a result, certain hacks in web sites can cause those sites to display incorrectly in Internet Explorer 8. This can be addressed by forcing browsers to render your site in what is called "compatibility mode". The following instructions detail how to enable compatibility mode site wide, if your site is hosted on an Apache server.

Setting Compatibility Mode for all visitors on Apache

Enabling compatibility mode on an Apache server requires the ability to create and edit .htaccess files, and mod_headers must be installed on the server. Most shared and dedicated hosting plans should allow this.

Simply add the following line to your .htaccess file.
Code:
Header set X-UA-Compatible "IE=EmulateIE7"
Natural questions:
1. Can that result in worse performance for some sites, or
2. Is it always a good rule to add that line to your .htaccess file?
3. More precisely, adding that code line has no negative side effects, it can do no harm?
Quote:
Originally Posted by wige View Post
Setting Compatibility Mode on other platforms
If you can not use the above method for any reason, you can add compatibility mode to each page by adding the following meta tag:
<meta http-equiv="X-UA-Compatible" content="IE=EmulateIE7" />
Add it to each page? So you can not set it in robots.txt (since that is aimed at robots and not browsers)?

Last edited by kgun; 03-25-2009 at 11:58 AM.
Reply With Quote
  #3 (permalink)  
Old 03-31-2009, 01:20 PM
wige's Avatar
Moderator
WebProWorld Moderator
 
Join Date: Jun 2006
Location: United States
Posts: 2,661
wige RepRank 9wige RepRank 9wige RepRank 9wige RepRank 9wige RepRank 9wige RepRank 9wige RepRank 9wige RepRank 9wige RepRank 9wige RepRank 9wige RepRank 9
Default Re: Configuring Servers for Internet Explorer 8

Quote:
Originally Posted by kgun View Post
Natural questions:
1. Can that result in worse performance for some sites, or
Header set has no known issues as far as performance. There can be some issues where if you enter this line twice, where the second line may be ignored. However, this should only be set to a single value.

Quote:
Originally Posted by kgun View Post
2. Is it always a good rule to add that line to your .htaccess file?
No. Personally, I would only use it if the site needs to be forced into compatibility mode. Otherwise, the browser should be left to its own devices to determine rendering mode.

Quote:
Originally Posted by kgun View Post
3. More precisely, adding that code line has no negative side effects, it can do no harm?
I have seen none. The Header module for Apache is frequently used to send data (if you use PHP for example, it is used to send the version of PHP). Most requests have several headers that browsers ignore, most of which are version numbers. Most clients (Ok, all of them except IE will completely ignore this header.

Quote:
Originally Posted by kgun View Post
Add it to each page? So you can not set it in robots.txt (since that is aimed at robots and not browsers)?
No. Just the opposite. This is only meant for browsers, not for robots.
__________________
The best way to learn anything, is to question everything.
Reply With Quote
  #4 (permalink)  
Old 04-01-2009, 03:17 AM
dharrison's Avatar
WebProWorld 1,000+ Club
WebProWorld MVP
 
Join Date: May 2005
Location: Essex, UK
Posts: 1,289
dharrison RepRank 4dharrison RepRank 4dharrison RepRank 4
Default Re: Configuring Servers for Internet Explorer 8

Hi Wige

At the moment I am using:

Code:
<meta http-equiv="X-UA-Compatible" content="IE=EmulateIE7" />
in all my pages, which seems to be working (viewing using BrowserPool). The whole MSIE8 has given me a headache for months. Its weird how they offered it for download in Beta mode last year.

I have also read IEBlog : Compatibility View Improvements to come in IE8 which also demonstrates the compability mode that you were referring to (which in honesty wouldn't have been needed had Microsoft not been so arrogant!)
__________________
Deb Harrison
DVH Design
Essex Web Design
Reply With Quote
  #5 (permalink)  
Old 04-01-2009, 10:25 AM
Clint1's Avatar
WebProWorld 1,000+ Club
WebProWorld MVP
 
Join Date: Jun 2005
Location: Louisiana, USA
Posts: 1,324
Clint1 RepRank 9Clint1 RepRank 9Clint1 RepRank 9Clint1 RepRank 9Clint1 RepRank 9Clint1 RepRank 9Clint1 RepRank 9Clint1 RepRank 9Clint1 RepRank 9Clint1 RepRank 9Clint1 RepRank 9
Default Re: Configuring Servers for Internet Explorer 8

"Subscribe to this thread" is no longer working on this thread. So I'm having to post to subscribe to it.
__________________
Happy Thanksgiving to all & God Bless,
-Clint
(Join Date: 2003)
Reply With Quote
  #6 (permalink)  
Old 04-01-2009, 04:49 PM
dharrison's Avatar
WebProWorld 1,000+ Club
WebProWorld MVP
 
Join Date: May 2005
Location: Essex, UK
Posts: 1,289
dharrison RepRank 4dharrison RepRank 4dharrison RepRank 4
Default Re: Configuring Servers for Internet Explorer 8

I'm getting awful dejavu on this forum. I can swear we've all been here before
__________________
Deb Harrison
DVH Design
Essex Web Design
Reply With Quote
Reply

  WebProWorld > Webmaster, IT and Security Discussion > Web Programming Discussion Forum

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Internet Explorer 7 drummin Graphics & Design Discussion Forum 13 12-22-2006 10:06 AM
Internet Explorer 7.0 countryjoe IT Discussion Forum 4 12-13-2006 12:55 PM
Internet Explorer 7 irodgers IT Discussion Forum 3 09-12-2006 02:56 PM
Internet Explorer 7 richkoi Graphics & Design Discussion Forum 18 02-23-2005 02:16 PM
Internet Explorer Pop-ups pedstersplanet Internet Security Discussion Forum 30 07-12-2004 06:52 PM


All times are GMT -4. The time now is 12:44 AM.



Search Engine Optimization by vBSEO 3.3.0