Sunday, April 11, 2010

Old Browser Warning for your Website

Wouldn't it be great, if old browsers like the Internet Explorer 6 would vanish in your server's logs?
Every website owner can and in my opinion should encourage people to update their out-of-date browsers. All they have to do, is adding a little warning to their site in the moment a legacy browser is detected.

I'm sure a few months ahead this won't be an issue at all. Browsers, like today Chrome, will automatically update and therefore forcing updates.
But till then the website owners are in charge to enlighten their users.

For example:

Just add the unobtrusive script from to your pages (direct before the </body> tag):

<script type="text/javascript">
  var $buoop = {} 
  $buoop.ol = window.onload; 
    if ($buoop.ol) $buoop.ol(); 
    var e = document.createElement("script"); 
    e.setAttribute("type", "text/javascript"); 
    e.setAttribute("src", ""); 

Then users with an old browser would see a non-intrusive warning at the top of the page: