View Full Version : Detect browser
Robbie
25-02-2007, 10:53 AM
Is there a script where I can do like
If Browser is IE6 or Lower then goto a page that says you need to update
or if browser is ie7+ or Firefox then load the site?
Thanks
JS or PHP.
If you mean, when you load the page - if it detects it's ie6 then it shows /upgrade.php or whatever?
There will be one somewhere.
letisix
25-02-2007, 10:55 AM
Yeh, Theres one somewhere.
Robbie
25-02-2007, 10:55 AM
JS or PHP.
And yeah I mean like that
Luckyrare
25-02-2007, 11:26 AM
Dont do that "/ You will honestly loose a lot of visitors. Make your coding cross browser rather than just blocking them out
Jabba
25-02-2007, 11:29 AM
Is there a script where I can do like
If Browser is IE6 or Lower then goto a page that says you need to update
or if browser is ie7+ or Firefox then load the site?
Thanks
I would advise you not to do that as alot of people don't use legal versions of windows which means they can't upgrade to IE 7 and don't want to download a different browser ie. Firefox.
Robbie
25-02-2007, 11:48 AM
Well then how do I get ie6 to display http://robbiegray.info/layout properly
hybride
25-02-2007, 05:51 PM
certainly
<html>
<script>
if(navigator.userAgent.indexOf("Firefox") != -1)
{
window.location = "browser/firefox.html";
}
else if(navigator.userAgent.indexOf("MSIE") != -1)
{
window.location = "main.php";
}
else if(navigator.userAgent.indexOf("Netscape") != -1)
{
window.location = "main.php";
}
else
{
window.location = "browser/other.html";
}
</script>
</html>
RNelson
25-02-2007, 05:53 PM
Try coding it properly maybe?
Well then how do I get ie6 to display http://robbiegray.info/layout properly
Mentor
25-02-2007, 06:26 PM
Dont do that "/ You will honestly loose a lot of visitors. Make your coding cross browser rather than just blocking them out
Well he ether has to do that, or get of his **** and actualy code his pages properly in the first place "/ (then spend the additional 5 hours adding browser hacks so IE wont **** it up...)
Robbie
25-02-2007, 07:02 PM
Well I cant code layouts, and I bought it coded off Adam
Want to hide these adverts? Register an account for free!
Powered by vBulletin® Version 4.2.5 Copyright © 2025 vBulletin Solutions Inc. All rights reserved.