I have a website with a few jQuery animations, commands, etc.
It runs flawlessly in Google Chrome and Firefox, but is a real pain when it comes to IE.
Is there a code I can insert at the beginning of my webpage (before loading anything else) in order to check what browser the user is using, and if it’s IE, get a warning box to pop up to ask him (kindly) to consider switching to FIrefox or Chrome?
INFO: I have no knowledge whatsoever in .NET, PHP, or other server-side languages (didn’t really need it so far).
Why don’t you just use the IE-only IF commands (other browser treat them as comments)?:
<!--[if IE]><div id="ie-warning">Please switch browsers!</div><![endif]-->No JS neededFor versions:
<!--[if IE lte 7]>Your IE is version 7 or lower<![endif]-->(IE Less Than or Equal to 7)<!--[if IE gte 8]>Your IE is version 8 or higher<![endif]-->(IE Greater Than or Equal to 8)Sorry if I’m missing something, but I think that will work.
Further info: http://msdn.microsoft.com/en-us/library/ms537512(v=vs.85).aspx