Code Snippet
iPad Detection
Of course, the iPad is a pretty large screen and a fully capable browser, so most websites don't need to have iPad specific versions of them. But if you need to, you can detect for it with .htaccess
RewriteCond %{HTTP_USER_AGENT} ^.*iPad.*$
RewriteRule ^(.*)$ http://ipad.yourdomain.com [R=301]
This will redirect iPad users to a URL you specify. This is probably the best way to do it (assuming you are running an Apache server), but if you aren't, there are PHP and JavaScript methods here.
For CSS you can use
Actually, I’m under the assumption that this snippet could also be used to make sure an capable iPad sees the full and normal version of your site … As the poster mentions, the iPad has full size screen and capable browser … yet I’ve experienced while using Safari on the iPad, many sites currently detect the mobile version of Safari and dump me into the mobile versions of their site, then I continually have to hunt for a way to get to the standard version on many pages, this is annoying (Twitter for instance hides the link to the standard version of their pages, all the way at the bottom of their footer)
i’ve written a jquery slider version of my site at electricarms.com/Slider.html gonna try to implement this…thanks for the tips
wow your site (electricarms.com/Slider.html) needs way more blue in it.
P.S :
Flash sucks balls.
thanks parker…i’ve done everything but the flash part on the site so i’m glad its not my work that sucks balls-you must have missed the point of the site because you are working with Windows 95
PS:
sarcasm is far more awesome than flash, but it sucks balls too
How would just change the css file instead of the whole site.
Is it possible to use the .htaccess rewriterule to only redirect one page within a site? For example, if one page has a flash object, can I redirect requests for that one page to a static version just for iPads?
Here is the Android User Agent
RewriteCond %{HTTP_USER_AGENT} ^.*Android.*$
I’m up to my elbows in a behemoth 600 page raw code HTML/JS site that wants to be optimized it for ipad. It was optimized by the last guy for iphone and I can see it in the js…the two chunks of code for browsers and iphone are the same. What do I add to the file to optimize for ipad? Or where can I look? Everything I’m finding is for apps… -am
DigWP
A book and blog co-authored by Jeff Starr and myself about the World's most popular publishing platform.
Quotes on Design
Design, like Art, can be an elusive word to define and an awfully fun thing to have opinions about.
HTML-Ipsum
One-click copy to clipboard access to Lorem Ipsum text that comes wrapped in a variety of HTML.
Bookshelf
Hey Chris, what books do you recommend? These, young fertile mind, these.