Iphone vs ipad mobile phone site redirection
We have an issue, with our mobile banking site.
Users with iphone and other mobile phones are re-directed correctly to the mobile vesrion of our internet banking The issue is with us开发者_如何学Cers that have Ipads they get redirect to the mobile banking site aswell instead of the the normal internet banking site.
How do we fix this problem?
Whether or not someone is visiting your webpage on an iPad can be done like so
via JavaScript:
var userHasiPad = navigator.userAgent.match(/iPad/i) != null;
PHP:
$userHasiPad = (bool) strpos($_SERVER['HTTP_USER_AGENT'],'iPad');
Both of these are essentially checking the User Agent string for the existence of the string "iPad".
精彩评论