Searching for just the iPhone UA locks out other mobile WebKit-based browsers that may prefer an iPhone page, such as Android and the Pre. Even if you do want to serve just iPhone users, I think you'd be better off adding a new mime type and serving that.
Also, there's an onorientationchange event on the window object you can listen for, which would be much more efficient than firing a timer every 200ms.
That article is no older than the one linked! There's also a rails plugin that can serve mobile views to various mobile browsers including opera mobile. Sorry, on mobile at the moment and I can't remember the name but try searching github.
Developers: if you expose an iPhone view of your site that reduces what content you show versus your main site _please_ allow me to opt-out of it via a long term cookie. Facebook's native app on the iPhone is still a little buggy so I often load the site up via Safari and _every_ time I have to scroll to the bottom and select "View Full Site".
People, i´m building an online VOIP app with ruby and i want to extend this app for iphone users. So i need any information on how to make the web app available on iphones (in the future, for any cellphones). The best that i get so far was this one. Any tips ?
[+] [-] rufo|17 years ago|reply
Also, there's an onorientationchange event on the window object you can listen for, which would be much more efficient than firing a timer every 200ms.
This article (while a bit old) I think does a better job of showing you should go about writing an iPhone-friendly interface with Rails: http://www.slashdotdash.net/2007/12/04/iphone-on-rails-creat...
[+] [-] hopeless|17 years ago|reply
[+] [-] jasongullickson|17 years ago|reply
Apple's introduction to Rails development touches on this subject but something more detailed yet still concise is greatly appreciated.
[+] [-] dugmartin|17 years ago|reply
[+] [-] marcofloriano|17 years ago|reply
[+] [-] joepestro|17 years ago|reply
Check out the iPhone SDK for more info: http://developer.apple.com/iphone/