Can anyone recommend an elegant "No IE6 Support" script?

I would like to kindly and elegantly tell people who use Internet Explorer 6 to either update their browser or break their computers into small parts when they come to my site.

+8
javascript html css internet-explorer-6
source share
6 answers
+19
source share

Use conditional comment. :) http://www.quirksmode.org/css/condcom.html

+2
source share

This is my personal favorite: http://ie6update.com/

It is suspicious, like a legitimate Microsoft update or an Active X invitation. This should trick the dinosaurs into adapting ....

+1
source share
<?php $ua = browser_info(); if (($ua['msie']==6.0)) { echo "PUT HERE YOUR TEXT THAT SHOULD BE DISPLAYED IN IE6"; }else{ echo ""; } ?> 
0
source share

You need a div on your page, for example:

 <div class='noAccess'> </div> 

and jQuery:

 var IE6 = (navigator.userAgent.indexOf("MSIE 6") >= 0) ? true : false; if (IE6) { $(function() { $("<div class='noAccess'>") .css({ 'height': $(window).height() }) .appendTo("body"); $("<div class='noAccessMessage'><p class='h1'>Sorry! This site doesn't support Internet Explorer 6.</p><p class='h4'>To continue, please update your browser to the latest version of FireFox or Internet Explorer using the links below.</p><table width='100%' cellspacing='0' cellpadding='0'><tr><td align='center' valign='top'>FireFox <a href='http://www.mozilla.com' target='_blank'><img src='images/Firefox-32.png' alt='FireFox' border='0' /></a><br />recommended</td><td align='center' valign='top'>Internet Explorer <a href='http://www.microsoft.com/nz/windows/internet-explorer/default.aspx' target='_blank'><img src='images/IE-32.png' alt='Internet Explorer' border='0' /><a/></td></tr></table>") .appendTo("body"); }); } 
0
source share
0
source share

Source: https://habr.com/ru/post/649871/


All Articles