Is there a simple and automatic way of checking if a visitor to my website (written in asp.net) is using the latest version of his browser? This would allow me to display a message to inform them that they're running an old version and that they might want to upgrade.
My website is tested on most broswers but I don't test old versions (such as Internet Explorer 6 etc). When one of my visitors is using such an old version, basically, I would like to encourage (not force) them to upgrade.
Of course I could do this myself by getting the version of the browser and look it up in my database but I don't want to have to maintain a 'browser version' database myself. There is probably a web service or something similar that I could call and would check this for me.
Any ideas?
views:
129answers:
4Yes there is.
The best / quickest way to do this in my opinion is with Javascript.
Please see; http://www.w3schools.com/js/js_browser.asp
Speaking as a user of websites, if I come across a site that advised me to upgrade my browser then that would be an immediate black mark against that site.
I might not be able to upgrade (if I'm accessing from a corporate network for example); I might have a specific reason for using a particular version (if I'm a web developer wanting to ensure compatibility with my user community for example).
So personally, I would say that a blanket disclaimer that you don't test this site on earlier versions would be the way to go. That's quite apart from the technical challenge of what you want to do.
I admire your intentions, but is a user really going to upgrade their browser based on your website's suggestion? I am reminded of the old "Netscape Now" buttons that used to litter websites.
IE6 is still used by a lot of users, so I would strongly recommend ensuring that your browser works in it.
I hate when websites do that. Especially when they do it wrong (like Live.com, which tells me to upgrade Chrome to Firefox or IE7).