Is there a snippet, or some other way, that I can do a browser check on my splash screen?
Basically if someone is using Internet Explorer, I want to redirect to a page that says, "Sorry, this site only works with Firefox or Safari" !
Thanks!
Here is a javascript that does the job:
http://www.quirksmode.org/js/detect.html
But remember, there are still a couple of MSIE users out there.
I think, thererfor I am! But what I am, and why...?
-
☆ A M B ☆
- 24,524 Posts
You also might want to keep in mind that a lot of non-IE users have their browsers configured to report themselves as IE to avoid being blocked in sites that check for the browser.
Quote from: danzg at Sep 11, 2008, 10:29 AM
<!--
if (navigator.appName =="Microsoft Internet Explorer")
//-->
You should also test aginst MSIE. Code taken from the example I gave you:
{
string: navigator.userAgent,
subString: "MSIE",
identity: "Explorer",
versionSearch: "MSIE"
}:)
I think, thererfor I am! But what I am, and why...?
<!--[if IE]>
Anything you want here -- other browsers will ignore it.
<![endif]-->
Hmmm.. It blew me off in FF3.
This is the format:
<!--[if expression]> HTML <![endif]-->
If you pasted directly from the code I posted, it should work. I took it from a working site.
I hate MS just as much as the next guy, but Just out of curiosity, what’s your motivation for blowing off over 50% of your potential visitors?
http://www.w3schools.com/browsers/browsers_stats.asp