Mobile app version of vmapp.org
Login or Join
Marchetta884

: Why are Win7 IE browers running in IE7 mode? On our site we currently have approx. 50% of our IE7 users running Windows 7. However, Win7 was released with IE8 meaning that something is not

@Marchetta884

Posted in: #Compatibility #InternetExplorer #InternetExplorer7 #Windows #Windows7

On our site we currently have approx. 50% of our IE7 users running Windows 7. However, Win7 was released with IE8 meaning that something is not right. Based on this, we made the assumption that the modern IE browsers enter IE7 compatibility mode on our site. So we placed the "X-UA-Compatible=edge" meta tag on our site in hope to kill off IE7 support. However, after a week, the percentage of IE7 (and IE8) users have gone up for the first time since the start of this year.
When looking at the X-UA-Compatible documentation, it is meant to be used for putting your site into an older mode.


Is there any other way to make sure that IE doesn't enter compatibility mode?
Is there something else we need to look for?


And yes, we have so many users on our site that we can't kill off IE7 until it goes down under 2% of unique visitors.

EDIT: We use <!doctype html>

EDIT2: We haven't been able to reproduce the compatibility mode in our environments either

10.02% popularity Vote Up Vote Down


Login to follow query

More posts by @Marchetta884

2 Comments

Sorted by latest first Latest Oldest Best

 

@Si4351233

Ok, so we have confirmed that our calculations were incorrect.
Our provider was giving us reports based on the number of "visits". A visit is calculated based on the amount of time a user spends on our website. However, IE7 users might be rare but they might spend more time on a website compared to a Chrome user. This meant that the percentage we were going by were not based on the percentage of users with a browser, but something like "how much time does a user spend on our site, based on the browser they use".

We finally decided to drop support for IE7. The calculation was simple: The amount of time our team spends to adjust the site for IE7 does not weigh up the amount of revenue we get from the same users. It's worth noting that we won't be going through our code in one go and removing all fixes we have for IE7. Instead we will be doing it over time as part of our daily work. This means that the site will still work for IE7 for a long period of time with only minor glitches. But hopefully by the time the site is unbearable in IE7, the last few percent of users will have upgraded.

The actual solution to the problem:

In order to reduce the number of users in compatibility-mode, we tried using the X-UA-Compatible=edge flag.
The flag can be set using both a HTML tag and as a request header. We tried both, but that didn't affect our numbers to a noteworthy level. If a site has once ended up in a old browsers compatibility-mode then it stays there until the user actively selects to go to normal browsing. To come around this we decided to do the same thing as Google+ when users are in the same jam: Show a bar at the top of the page for each time the page is loaded. This bar contains a link to information on how to exit Compatibility mode for a website, and the bar will not go away until they do.

To check if a user is surfing in compatibility mode:

var ua = navigator.userAgent.match(/MSIE [0-9]*/);
var version;

if (ua && document.documentMode !== undefined) {
version = parseInt(ua[0].replace(/[^0-9]/g, ""));
if (version !== document.documentMode) {
alert("Compat mode!");
}
}


(solution based on other stackoverflow questions. Amongst others:
this and
this)

10% popularity Vote Up Vote Down


 

@Mendez628

Is there any other way to make sure that IE doesn't enter compatibility mode?
Yes. Use a doctype that makes the browser go into standards mode.

<!DOCTYPE html>


should do the trick

10% popularity Vote Up Vote Down


Back to top | Use Dark Theme