by Mike » Thu Aug 20, 2009 4:29 pm
It's amazing how many sites actually don't work at all in the iPhone. For example, huge
portions of monster.ca are horribly broken. Some companies are just starting to
get it. The Toronto Star has an iphone URL. Smart.
As PG can surely tell you, this is where using MVC in your design process really helps.
Model - Viewer - Controller, where your data model, business logic, and presentation layer
are distinct and separate. All you would have to do to redo your entire site for the iphone
is a new skin, just HTML and style sheets. Apply the new view to your controller, presto,
a shiny new iphone-friendly site.
I've also used mod_rewrite in Apache to do the 301 redirects instead of burdening
PHP or Javascript for browser detection. It's built right in to Apache. Just check
for the iphone (or any mobile browser) agent string, rewrite with 301 to the new
mobile url.