Jump to content

Browser Detection


cdoggg94

Recommended Posts

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.html
http://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.

Link to comment
https://forums.phpfreaks.com/topic/275868-browser-detection/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.