cdoggg94 Posted March 19, 2013 Share Posted March 19, 2013 Basically we have a lot of people that want to view our site that use work computers and don't have the option to upgrade their browser. Most likely its an old version of IE.All I want to do is detect if they are using something older then say IE 7. (we have tested with IE 7 and everything works fine on it) If it IS older then that I want to send them to a dumbed down version of the pages. I have looked up things like this: http://www.quirksmode.org/js/detect.htmlhttp://api.jquery.com/jQuery.browser/Which is fine, but I dont know how to simply send them to the right page.I have done this sort of thing if they were using a mobile device like this: <script type="text/javascript"> // <![CDATA[ if ((navigator.userAgent.indexOf('iPhone') != -1) || (navigator.userAgent.indexOf('iPod') != -1)) { document.location = "http://www.Website.com/Mobile/"; } // ]]> if ((navigator.userAgent.indexOf('iPad') != -1)) { document.location = "http://www.Website.com/Mobile2/"; } // ]]> </script> Would it be the same type of thing but with the information in the detection script replacing the "iPhone", "iPad" ? Any help would be great. Thanks. Quote Link to comment https://forums.phpfreaks.com/topic/275868-browser-detection/ Share on other sites More sharing options...
nogray Posted March 19, 2013 Share Posted March 19, 2013 You can use a simple conditional comment for IE. e.g. put this in the your page header. <!--[if lt IE 7]> <meta http-equiv="refresh" content="0;URL='http://www.mydomain.com/mypage/'" /> <![endif]--> Quote Link to comment https://forums.phpfreaks.com/topic/275868-browser-detection/#findComment-1419655 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.