Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Graceful way to tell users of IE7 and below to go away?

TLDR: Tell IE6/7 users to leave in a nice way :) whilst blocking them from all content.

Basically I do not need people using IE7/6 lower on my web app. Was thinking of just doing a doc.write after load to wipe the page with a message of "Sorry your browser is outdated" has anyone done similar and found a nice friendly way to tell them to come back with a better browser?

Am currently using jquery so jquery solutions viable.

(1) Most reliable way to detect browser?

(2) Opinion on what to present to the user?


The SCENARIO is not the question here

They will have access to upgrade if need be!

I have legit reasons for doing so so stay ontopic to the question and don't voice opinions about the general topic of IE6 and how much you love it.

like image 251
Sphvn Avatar asked Aug 05 '10 00:08

Sphvn


3 Answers

If possible, put the fear of God into your users. That might actually get them to go through with the upgrade:

if ($.browser.msie && parseInt($.browser.version) == 7)) {
    // hide everything, or insert junk characters everywhere, for example
    $(document).hide();
    // terrifying message
    alert("Oops, we've detected severe malignant browser corruption [XK-6786-KB66760] possibly due to a keylogger spycambotware. Kindly upgrade your IE installation. See microsoft.com for details");
}
like image 184
karim79 Avatar answered Oct 21 '22 21:10

karim79


Use an IE conditional statement (e.g. <![if lte IE 7]>Upgrade your browser<![endif]>) and remove the content with jQuery.

like image 44
Gert Grenander Avatar answered Oct 21 '22 21:10

Gert Grenander


Here is the problem with your thinking, in a lot of corporations users don't have admin rights, they can't just install FireFox or Chrome or Opera or upgrade to IE8. No, they are stuck with whatever the corporate standard is. I have to deal with people that work for financial institutions...those people have custom versions of IE installed where half the stuff is stripped away and even JavaScript is disabled in some cases

This is also the reason that IE6 won't die anytime soon

like image 15
SQLMenace Avatar answered Oct 21 '22 21:10

SQLMenace