Posts tagged javascript
How to – detect iPhone with Java-script
Apr 23rd
Here is a javascript code snippet that will help you detect iPhone
if((navigator.userAgent.match(/iPhone/i)) || (navigator.userAgent.match(/iPod/i))) {
if (document.cookie.indexOf("iphone_redirect=false") == -1) {
window.location = "http://website.com/iphone";
}
}

