Web Design for Mobile Phones

June 10, 2009. Permalink

It's different, because the browsers are crappier than on the desktop, and almost all mobile phones have their own quirks. Some of these can be really frustrating, like the Nokia phone refusal to reload pages even after the cache has been cleared.

In order to develop a mobile site hosted on a LAN I wrote a small proxy called mproxy whose sole purpose is getting pages and saving them with a unique identifier in a local cache, so one can actually look at the source code of [sometimes] dynamically generated pages to see if, say, Amazon sends different code to different phones.

This obviously only works with phones that have Wifi, but it works like a charm because Wifi is a lot faster, saving up- and download, and it cuts out the middleman because you don't need SIM cards in your phones.

mproxy changes headers both ways in order to get individual files; Keep-alive and ranges are therefore disabled as are several other features which would make life more difficult.

Once you've seen what works and what doesn't you'll use the same proxy with different settings to access pages on the LAN.

To overcome the Nokia cache problem I added a link to http://nokiareload.nop/ at the top of a test page. This address is intercepted by the proxy, which prints a very brief page with a link back to the referring test page. To work around the cache problem go to the proxy generated page, clear the cache, then hit the link pointing back to the referer. Now the phone has to reload the page with all up to date modifications because it's neither in memory nor in the phone's cache.

The proxy will probably compile on any unix-like system and runs in user space without special privileges. To clean the cache you'll have to use system utilities or create a script controlled by cron. Download mproxy here.


Google's Best Practices for CSS

June 8, 2009. Permalink

Google has created a list of best practices that appear to improve page rendering speed in the browser. Some of the recommendations are obvious once you contemplate the workings of a browser rendering engine, others aren't quite so.

Would you have thought that Javascript is supposed to be faster than the :hover pseudo-selector if it's applied to non anchor tags?

On the same page you find a large list of other best practices related to page creation and delivery.

Blog Archive

© Copyright 1998 - 2009 Klaus Schallhorn.