Apple’s releasing a new phone today (if you didn’t know that, you’re lucky). Beside curing all manner of ills, the phone has a great web browser that should get people really interested in using the web while on the move.
Now, the thing is lots of other phones have decent browsers — many phones run Opera, for example, or at least the Opera Mini. And with reasonable data plans becoming increasingly common, it definitely makes sense to get your site ready for mobile browsing.
I used a media="handheld" stylesheet declaration on this site, but that wasn’t very well supported. So here’s a better solution that requires very little work, if you run Wordpress:
- Get the Wordpress Mobile Edition plugin and install it. This will create a wp-mobile.php file in your Wordpress plugins folder, and a wp-mobile folder in your Wordpress themes folder.
- Open wp-mobile.php in a text editor and search for the word 'iPhone'.
- If you don’t find it (I’m sure it’ll be added as soon as the user-agent string is confirmed) add this text exactly as shown (without double quotes) somewhere in the middle of the list of browser user-agents: " ,'iPhone' " (search for the text 'small_browsers' to find this list). When you’re done, save the file.
- Optional — you can also tweak your site’s mobile appearance by going into the wp-mobile folder (under your Wordpress themes folder) and editing the files there (mainly index.php). Some knowledge of PHP is required, but you can avoid the PHP and modify only the HTML inside the file.
- Test your mobile site using the Opera Mini applet, iPhoney (if you’re on a Mac) or even a real iPhone . Emulators for most other phone browsers are also available.
The other advantage of a mobile-ready version of your blog is that mobile versions tend to very accessible and compact. Most accessible browsers already support disabling stylesheets, images, etc, but they still have to load other text, such as blogrolls, sidebars, etc. You could use the wp-mobile theme along with a theme switcher that would allow users to switch to a compact, accessible version if they wish.