This week's book giveaway is in the Design forum.
We're giving away four copies of Design for the Mind and have Victor S. Yocco on-line!
See this thread for details.
Win a copy of Design for the Mind this week in the Design forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

IE 8 compatibility Issue

 
Paranidharan Selvaraj
Greenhorn
Posts: 17
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 15385
6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 17
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 15385
6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 17
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
<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?

 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic