Skip to content

Instantly share code, notes, and snippets.

@cloudhead
Created July 4, 2010 17:59
Show Gist options
  • Star 7 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save cloudhead/463624 to your computer and use it in GitHub Desktop.
Save cloudhead/463624 to your computer and use it in GitHub Desktop.
window.onload = function () {
if (! document.querySelectorAll) { // Quick & Dirty way to tell the good browsers from the bad ones.
alert("Please upgrade your browser to view this site.");
}
};
@andreyvit
Copy link

A slightly better ‘action’ part:

window.onload = function () {
  if (! document.querySelectorAll) { // Quick & Dirty way to tell the good browsers from the bad ones.
    window.location.href = "/screenshot.png"; // a screenshot from Safari/Chrome + a message to upgrade the browser
  }
};

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