Are there any jQuery plugins or templates that people use to get poeple to stop using IE6 on their websites?
I recently saw a plugin that was very obtrusive and offensive that "warned" users of evil of IE6. I am looking for something one can show their customers.
views:
518answers:
5Just add a div that only IE6 users see.
<!--[if IE 6]>
<div>
Using IE 6 will curve your spine, please upgrade your version
of Internet Explorer or download Firefox, Opera, Safari or Chrome.
</div>
<![endif]-->
You can code it yourself with CSS.
Either use conditional comments in HTML to use a specific stylesheet for IE6
<!--[if IE6]> whatever <![endif]-->
or put the message in a layer (div) and make it visible only for IE6:
display: none !important;
*display: block;
How about this? Puts a polite notification bar at the top of the page. (Courtesy think2loud, see this link for full source, sample, css, etc.).
function badBrowser(){
if($.browser.msie && parseInt($.browser.version) <= 6){ return true;}
return false;
}
function getBadBrowser(c_name)
{
if (document.cookie.length>0)
{
c_start=document.cookie.indexOf(c_name + "=");
if (c_start!=-1)
{
c_start=c_start + c_name.length+1;
c_end=document.cookie.indexOf(";",c_start);
if (c_end==-1) c_end=document.cookie.length;
return unescape(document.cookie.substring(c_start,c_end));
}
}
return "";
}
function setBadBrowser(c_name,value,expiredays)
{
var exdate=new Date();
exdate.setDate(exdate.getDate()+expiredays);
document.cookie=c_name+ "=" +escape(value) + ((expiredays==null) ? "" : ";expires="+exdate.toGMTString());
}
if(badBrowser() && getBadBrowser('browserWarning') != 'seen' ){
$(function(){
$("<div id='browserWarning'>You are using an unsupported browser. Please switch to <a href='http://getfirefox.com'>FireFox</a>, <a href='http://www.opera.com/download/'>Opera</a>, <a href='http://www.apple.com/safari/'>Safari</a> or <a href='http://www.microsoft.com/windows/downloads/ie/getitnow.mspx'>Internet Explorer 7</a>. Thanks! [<a href='#' id='warningClose'>close</a>] </div> ")
.css({
backgroundColor: '#fcfdde',
'width': '100%',
'border-top': 'solid 1px #000',
'border-bottom': 'solid 1px #000',
'text-align': 'center',
padding:'5px 0px 5px 0px'
})
.prependTo("body");
$('#warningClose').click(function(){
setBadBrowser('browserWarning','seen');
$('#browserWarning').slideUp('slow');
return false;
});
});
}
I personally find any sort of messages telling me to use a particular browser both arrogant and a sign of laziness on the part of the developer/designer.
My reasoning is that if I am somehow able to make compatible cross-browser designs, why can't others? It becomes even more trivial when you consider "browser normalizers" that exists as javascript libraries or JQuery plugins which essentially nullify the minor differences.
Here is a good example of what I mean.
Keep in mind that many web users are 'held up' using IE6 because of their big corporation's IT department.
They already know about the need to upgrade and your message aggravates them further. Why make them more miserable? At least give a gentle message explaining why you can't support IE6.