Reputation: 11787
I have two user agent strings:
Mozilla/5.0 (iPad; CPU OS 5_0 like Mac OS X) AppleWebKit/534.46 (KHTML, like Gecko) Version/5.1 Mobile/9A334 Safari/7534.48.3
Mozilla/5.0 (iPad; U; CPU OS 4_3_2 like Mac OS X; en-us) AppleWebKit/533.17.9 (KHTML, like Gecko) Version/5.0.2 Mobile/8H7 Safari/6533.18.5
The first targets iOS5 and the second targets iOS4.
Is it possible to load a custom stylesheet for the first user agent string, then a different one for the later user agent string?
Upvotes: 0
Views: 153
Reputation: 929
if you uses php, just check $_SERVER['HTTP_USER_AGENT']
for value you need and place <link href="yourstyle.css" rel="stylesheet" type="text/css">
in head tag
Upvotes: 0
Reputation: 689
this tutorial should be helpful, it explains it in details : http://davidwalsh.name/detect-ipad
Upvotes: 1