| Author |
IE 8 compatibility Issue
|
Paranidharan Selvaraj
Greenhorn
Joined: Mar 19, 2010
Posts: 17
|
|
We are recently switched to IE8. There are compatibility issues, so we included the meta tag,
<meta http-equiv="X-UA-Compatible" content="IE=EmulateIE7" > and we modified css files.. It is working now. We need to work out the solution for the future release of IE also. Is there any specific way of doing it?
|
 |
Eric Pascarello
author
Rancher
Joined: Nov 08, 2001
Posts: 15357
|
|
There is no magic way.
Code to standards and adjust the CSS.
Notes on major changes: http://msdn.microsoft.com/en-us/library/cc304082%28v=vs.85%29.aspx
Eric
|
 |
Paranidharan Selvaraj
Greenhorn
Joined: Mar 19, 2010
Posts: 17
|
|
My issue has been setting the meta tag content depending on the version of IE 6, 7, 8, and later version.
if(navigator.appName == "Microsoft Internet Explorer"){
var meta = document.createElement('meta');
meta.setAttribute('http-equiv', 'X-UA-Compatible');
meta.setAttribute('content', 'IE=EmulateIE'+getIEVersionNumber());
document.getElementsByTagName('head')[0].appendChild(meta);
}
function getIEVersionNumber() {
if (/MSIE (\d+\.\d+);/.test(navigator.userAgent)){ //test for MSIE x.x;
var ieversion=new Number(RegExp.$1) // capture x.x portion and store as a number
return ieversion;
}
}
The meta tag appended has no effects. Can anyone suggest handling X-UA-Compatible for future releases.
|
 |
Eric Pascarello
author
Rancher
Joined: Nov 08, 2001
Posts: 15357
|
|
Meta tag has to be on the page BEFORE the page is rendered. Hence adding it as the page is loading will do nothing.
Eric
|
 |
Paranidharan Selvaraj
Greenhorn
Joined: Mar 19, 2010
Posts: 17
|
|
<meta http-equiv="X-UA-Compatible" content="IE=EmulateIE8" />
I am using this meta tag for IE8 compatibilty... Again if my client migrates to IE9 and i have to keep changing this.. Instead i like to code for all the versions.
Is it feasible?
|
 |
 |
|
|
subject: IE 8 compatibility Issue
|
|
|