Display a Message When a Browser is Unsupported


I want to warn users of Internet Explorer 6 using my site, that IE6 has had serious compatibility issues with my site in the past. What is the best way to do this?

Ideally, I want to have a message appear (not a new window, but a message box, if possible) that warns IE6 users of the issues and reccommends they update to either IE7, Firefox 3 or Opera 9.5.

Best Solution

The best way to target IE is through the use of conditional comments. You can then add some specific HTML that will only display in Internet Explorer.

<!--[if IE 6]>
<h1>Please upgrade your browser!</h1>

More on the subject: