Created
July 18, 2015 18:31
-
-
Save nocean/22f14760701fb0abb956 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/******************************************************************************* | |
OLDIE - or Old IE. A script that finds the version of IE you're using, | |
and redirects if lower than the set parameter. | |
[[ Created by Ryan McLaughlin, www.DaoByDesign.com ]] | |
*******************************************************************************/ | |
var browser = navigator.appName | |
var ver = navigator.appVersion | |
var thestart = parseFloat(ver.indexOf("MSIE"))+1 //This finds the start of the MS version string. | |
var brow_ver = parseFloat(ver.substring(thestart+4,thestart+7)) //This cuts out the bit of string we need. | |
if ((browser=="Microsoft Internet Explorer") && (brow_ver < 6)) //By default the min. IE ver is set to 6. Change as desired. | |
{ | |
window.location="http://www.example.com/oldie.html"; //URL to redirect to. | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment