Skip to content

Instantly share code, notes, and snippets.

@andrewle
Created October 20, 2010 14:54
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save andrewle/636574 to your computer and use it in GitHub Desktop.
Save andrewle/636574 to your computer and use it in GitHub Desktop.
IE/Navigator Flashback
<html>
<script>
function IsNewBrowser()
{
var isIE = navigator.appName.indexOf("Microsoft") != -1;
var isNav = navigator.appName.search(/Netscape/i) != -1;
var ver = parseInt(navigator.appVersion);
if(isIE || (isNav && ver >=5) )
return true ;
return false ;
}
function redirect()
{
document.location = (IsNewBrowser() ? 'local.html' : 'local-noie.html');
}
setTimeout('redirect()',1000);
</script>
</html>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment