Archive for September, 2008

How to improve performance on the iPhone:

2008-09-23

Especially then, when a page is initially loaded, Mobile-Safari’s cache is empty. That means all data has to be loaded. So an important part is to load the initial data as fast as possible

HTTP-Requests

Each component (Javascript, Image, CSS, etc…) in a page requires a separat HTTP-Request to get loaded. Although a browser performs HTTP-Requests parallely, the response times increase with the number of components in a web page.

Try to avoid unnecessary requests. This is especially crucial, when accessing data over 3GRPS or EDGE networks.

There are a number of techniques to achieve this goal, i.e. image maps, inline images, CSS sprites and CSS images.

Minify all the JavaScript, CSS and HTML. For components that aren’t shared across multiple pages, consider making them inline.

Cache

Include a cache-control header into the HTML-page.

Expires: [Expiration time in GMT Format]

Cache-Control: max-age=[Expiration time in seconds]

Note: The iPhone-Cache is NOT persistent across resarts. This means that Mobile-Safari’s browser cache on iPhone allocates memory from the system memory to create cached components but does not save the cached components in persistent storage

Cache-Limits

Make sure any component of a page is < 25KB, since the iPhone only caches components smaller than 25KB uncompressed!

Do not use more than 20 components > 25k, as everything above that will not get cached. According to the guys at Yahoo, the maximum cache limit for multiple ocmponents is found to be 475-500k.

Download-Limits

An individual component may not exceed 10MB in size (due to the limited memory of the iPhone). Although the maximum size is dependant on the current state of the iPhone’s memory (fragmentation, other running apps etc…)

NAS

2008-09-16

Finally I installed my brand new Synology 107+ NAS.

I am a bit unsure if it is really useful to me, since most of the stuff can be done with a regular MacMini much better. But since everything is pre-installed on the NAS, it’s setup could save some time. If that doesn’t work out it’s still a great backup-machine….