Jump to content

Place IE Conditional in Head or Body?


mkessler

Recommended Posts

Hey I want to add this conditional to my html so that anyone using ie 7 or less will see it upon the page loading. Should I place it in between the <head> or <body> tags?

<!--[if IE 7.0]><script language="JavaScript">alert("This site is not compatible with Internet Explorer 7.  Please upgrade to Internet Explorer 8.0 or use a different browser.  - Thank You");</script><![endif]-->

Link to comment
Share on other sites

It's perfectly legal to put script elements in your body. But the usual reasons for doing so do not apply here.The best reason for putting it in the head is to alert your user as soon as possible.Consider using [if lte IE 7], since you want to catch IE 6 as well.

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...