Best/good ways to alert users that they are using an old browser?
I have built a site, supporting IE9 + , how would I best alert a user that enters the site on IE8 that they aint getting the full experience/seeing a “broken” site?
I don’t know Javascript but here’s food for thought. Perhaps try and see if the browser supports (recognizes) a function/feature in Javascript that’s only recognized in IE9+. If it’s not recognized, then you know it’s an older browser (IE8 down) and hten you can go from there.
IE Supports HTML Conditionals. This is the best way to handle old versions of IE.
If Less-Than or Equal-To IE 9
<!--[if lte IE 9]>
<p>Please upgrade your browser, cause it's old as dirt and you should be ashamed.</p>
<![endif]-->
These work up to IE10. So you really could just say <!--[if IE]> and it would be the same thing.
This is a no-JS solution that is ignored by all other browsers because it’s read as a comment.
Handling it in JS or trying to handle old versions of other browsers means you need to start parsing the UA. You don’t want to parse the UA. It’s inaccurate and pretty much a waste of time because most people are not using old versions of Firefox or Chrome because they both have been auto-updating for a few years now. If someone intentionally disabled that, then it’s their own fault and there’s no reason you need to run code for every one of the 99.999% of your other visitors to handle these people.
Yes of course if only IE browsers are the issue then that’s an easy way to handle them (and I meant to mention that ). (It would also be nice to put a link to newer browser versions in the message and to a page that explains why they should update etc…)
Of course there are other old browsers out there that may have a problem and so it would seem logical to give them a message also. Even when dealing with just IE it would be nice to give the users a choice to remove/ignore the message which would once again require js…
The scripts I pointed to are quite nice and unobtrusive in that the messages can be removed if the the user so wishes.
I’ve always been on the fence about telling users to upgrade as there’s never really a nice way to tell someone they have an old browser as they may have no choice in what they use. These days though it does seem as though its completely acceptable to push to upgrade whereas in the past it used to be viewed as a bad move.