Display a warning message to IE6 users

Are you tired of visitors still using the obsolete and buggy IE6? We are. With yesterday’s launch of Internet Explorer 8, there is little excuse to not upgrading. But for those who insist on using this platform, you can warn them that your site is not (purposely) optimized for their viewing.

Here’s how to display a message only to IE6 users, asking them to upgrade their prehistoric browser.

The first thing to do is to create a style for our message. To do so, paste the following code in your style.css file:

#ie-message {
background:#C00;
text-align:center;
border-bottom:1px solid #900;
color: #fff;
position:absolute;
top:0;
padding:5px;
width:100%;
}
#ie-message a {
color: #fff;
}

Once done, open header.php and paste this code just after the <body> tag:

<!--[if lte IE 6]>
   <div id="ie-message">
      Your browser is obsolete. Please upgrade to <a href="http://www.getfirefox.com" target="_new">Mozilla Firefox</a>.
   </div>
<![endif]-->

Save the file and you’re done. Only IE6 users will see that message asking them to upgrade.

ie6-warning

6 Comments

Comments

    I found these IE6 messages quite funny (although some are a bit crude). These could work well with this technique…
    http://blog.hugsformonsters.com/post/87657240/overly-judgemental-ie6-splash-pages

    Dan Mihai Ile:

    Well you could use my newest project.
    The idea inspired me to create this project on google code: http://code.google.com/p/ie6-upgrade-warning/

    I want to translate it to as many languages as possible so that any web developper could add it to the webpages created. The initial language is very polite and suggests the use of a newer browser.

    You might want to work on the message – it’s rather blunt and needs to address the target audience. Some home users who are using IE6 won’t even know what a browser is (and it might not be IE, could be MSN Explorer or some other variant). Corporate users usually can’t switch from IE6 until ALL their intranet web apps have been upgraded – there are many huge companies still in this state.

    Why ‘upgrade to Mozilla Firefox’? What’s with this Mozilla promotion. There are other good browsers, like Safari, Google Chrome and especially Opera.

    Dan Mihai Ile, awesome work! I will use it on my website!

    On topic…
    Found this thread because I wanted to stop IE5 and IE6 users from accessing my website, and wanted to know how it’s done. So, thanks for the post.
    :)
    A comment for Karl, now.

    There are no “other” good browsers. Including Mozilla. They all stink! It’s just that old versions of IE are even worse.

    Personally, I hate ALL browsers. I’m a web-developer myself, and I know what I’m talking about. There’s NO such think as a “good browser”. There’s only “ones better than others”.

    Now, for the webmaster of contentrobot.com.
    :)
    Love that “also, as well” from the default message, here. Plus, you should remove the website input if you’re not publishing links “anyway”.

Leave a Reply

Your email address will not be published. Required fields are marked *

*

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>