Mobile Web Detector
- Started
- Last post
- 6 Responses
- epikore
Ok, I'm not familiar with the lingo at the moment but is there some sort of browser/mobile web detector that redirects a visitor depending on whether they're viewing the site via a computer or a cell phone? Javascript or something?
- dropdown0
I found this:
http://studiohyperset.wordpress.…- although i don't see iPhone in the list. Not sure if it needs to be or not.dropdown
- heavyt0
There are some easy ways to detect for iPhone specifically.
var ua = window.navigator.userAgent;
if(ua.indexOf('iPhone') > -1){
window.location = '/iPhone/';
}
- epikore0
So I put the php code in the site, and if the person is visiting via a cell phone it redirects to the mobile version of the site?
- epikore0
I'm using this code here. Any ideas on adding the iphone on there?
- Hoax0
opera mobile has an option in settings to choose to tell website whether you're browsing from a mobile or a pc which i think is neat.