MetaGuru
MetaGuru

Reputation: 43813

What could be the reprecussions associated with targeting IE7 and using the tag that forces IE8 into IE7 mode on a new web app?

I really don't want to do it, I want to target the latest browser. It seems a little backwards to target a legacy browser and then force IE8 to run in a compatibility mode. I wonder what would happen when IE9 came out?

However JQuery and CSS are both having some issues running properly in IE8, it works fine in IE7 and Firefox and I believe even Chrome. I want this thing to run well in IE7, IE8, and FF at least. Is there a better way or should I just use this tag for IE8?

<meta http-equiv="X-UA-Compatible" content="IE=EmulateIE7" />

What could be the risks for doing this? I just don't feel right about it but I don't really have any founded evidence to support my fears. My gut feeling is that it will cause problems down the road and create a potential for much rework. Thoughts?

UPDATE: Here is the actual problem itself...

if (dir == "back" || dir == "jump") {
     $.get(prevNode.attr("href") + "&bID=" + bID + "&ieRefresh=" + Math.random(), "",
          function(data) {
          p.nav.prevHtml = data;
     });
}

The error is:

Object doesn't support this property or method line 390, character 37 (the character that is found by these 'coordinates' is the dollar sign of the $.get()).

Upvotes: 3

Views: 229

Answers (3)

esvendsen
esvendsen

Reputation: 1500

It's surprising that jQuery isn't "running properly" in IE8. There are definitely differences in CSS between 7 and 8, but what exactly are you doing in jQuery that isn't working in 8?

Also, is using IE conditional statements not an option? i.e.

<!--[if IE 8]>
Special instructions for IE 8 here
<![endif]-->

UPDATE:

Sometimes using the $ sign can cause problems depending on whatever else you have going on. Does using "jQuery" instead of "$" do anything? I tried out your code in IE8 and didn't get any errors....

Upvotes: 1

Raynos
Raynos

Reputation: 169393

  • Look at your code.
  • Look at where your doing it wrong.
  • Fix your code.
  • Watch it work in IE8

Ideally what you want to do is make your entire website compatible with IE8. IE7 by itself is largely incompatible with FF & Chrome standards and requires a lot of hacking.

It's going to be significantly easier for you to upgrade compliance from IE8 to IE9 because IE9 isn't going to deal with IE6/7 code nicely.

jQuery will work properly in IE8. I can't fanthom what CSS works in IE7 & FF (Were talking FF3.6 right? not FF 1.5?) but doesn't work in IE8. This is a clear sign that your set up is doing something wrong.

Upvotes: 3

Cameron Jordan
Cameron Jordan

Reputation: 759

IE8 and IE9 both include the IE7 rendering engine (or something very close), it's better to force IE into a mode that you know works than leave anything broken.

Having said that, for best forwards compatibility you should investigate and correct your site to work properly in IE8 or at a minimum IE9. IE8 is not perfect but if you're not doing any browser detection jQuery and CSS 2.1 should both behave extremely well. The IE team has a nice blog post about using feature detection rather than browser sniffing (which is likely the problem here).

Upvotes: 0

Related Questions