Miscellaneous > Programming & Networking
Javascript to help IE users browsing your site.
noob:
I made this code for my Black Metal's band's website. May be of use to every webmaster in the world.
bname=navigator.appName
if (bname.indexOf("Microsoft")!=-1) {
(window.location='http://www.getfirefox.com')
}
Refalm:
I dislike the use of JavaScript, because you can disable it in the browser.
If you have PHP on your server, try this:
$bladeraar = $_SERVER['HTTP_USER_AGENT'];
if(eregi("msie",$bladeraar) && !eregi("opera",$bladeraar))
{
echo("<meta http-equiv=\"refresh\" content=\"10;url=http://www.browsehappy.com/\" />");
}
elseif(eregi("mspie",$bladeraar) || eregi("pocket",$bladeraar))
{
echo("<meta http-equiv=\"refresh\" content=\"10;url=http://www.browsehappy.com/\" />");
}
else
{
echo("<meta http-equiv=\"refresh\" content=\"0;url=index2.php\" />");
}
Aloone_Jonez:
I disagree, Firefox isn't the only alternative to IE and there're many people who use Opera who'll get this message as it identifies itself as IE6 by default. I don't like this kind of agressive Firefox marketing and it's one of my biggest dislikes about the Firefox community.
Refalm:
--- Quote from: Aloone_Jonez ---I disagree, Firefox isn't the only alternative to IE and there're many people who use Opera who'll get this message as it identifies itself as IE6 by default. I don't like this kind of agressive Firefox marketing and it's one of my biggest dislikes about the Firefox community.
--- End quote ---
At least my script makes a redirect to Browse Happy, which links to Firefox and Opera.
piratePenguin:
--- Quote from: Aloone_Jonez ---I disagree, Firefox isn't the only alternative to IE and there're many people who use Opera who'll get this message as it identifies itself as IE6 by default. I don't like this kind of agressive Firefox marketing and it's one of my biggest dislikes about the Firefox community.
--- End quote ---
Too many options can kill a man.
If Opera identifies itself as IE6 by default, that's very fucking stupid. The Opera developers should've expected their users to fall into these IE traps, afterall, THEY'VE GOT MICROSOFT IN THE AGENT STRING!
Some developers will check that Opera isn't included in the agent string aswell, but not all of them will for different reasons ("not my fault, I think I'm doing this the right way. Fix your fucking agent string.", "there's THREE web browsers?").
Navigation
[0] Message Index
[#] Next page
Go to full version