Skip to content

Instantly share code, notes, and snippets.

@Quby
Created July 12, 2011 09:13
Show Gist options
  • Save Quby/1077665 to your computer and use it in GitHub Desktop.
Save Quby/1077665 to your computer and use it in GitHub Desktop.
Best JavaScript function
(function () {
if (!Worker) //Detect IE
document.location = "http://www.whatbrowser.org/ru/browser/";
})();
@azproduction
Copy link

it also redirects safari mobile.

(function () {
    if ('v'=='\v') { //Detect IE
        document.location = "http://www.whatbrowser.org/ru/browser/";
    }
}());

@Quby
Copy link
Author

Quby commented Jul 12, 2011

@zba
Copy link

zba commented Dec 21, 2012

-[1,] && alert('Not IE!')

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment