Posts tagged "optimizations"

New localStorage optimizations for amazing mobile performance

by Josh Fraser on May 31, 2011

We are excited to announce some new optimizations that are now available for Torbit users.

One of the problems we discovered while working on mobile-specific optimizations is that mobile browser caches are pretty small. As a result, objects get flushed out of the cache quickly reducing the speed benefit for future visits. On top of that, mobile browsers open fewer TCP connections than a desktop browser and those connections typically have higher latency and lower bandwidth than a desktop connection. The result is a painfully slow experience while browsing the web from a mobile device.

The number one rule on the list of “best practices” for performance is reducing the number of HTTP requests. When a site is optimized by hand, you usually use techniques like combining JavaScript and spriting images to reduce the number of requests. In an automated environment like Torbit, many of those techniques are more difficult to apply. For example, JavaScript can have complicated dependencies that cause issues when you try to programmatically combine JavaScript files.

In March, Steve Souders wrote a blog post about his discovery that Google and Bing were using localStorage on their mobile sites to get dedicated cache space and reduce the number of requests for resources. After looking at what Google and Bing were doing, we realized we could automate these cutting-edge best practices and make them available to any site.

Today we’re announcing two new optimization filters: Local storage for CSS and Local storage for JavaScript.

The results are stunning. Most of our users can expect to shave significant time off their loading times with these new optimizations. While the impact is most obvious on mobile devices, the performance boost can actually be seen on any modern browser that supports localStorage. Below you can see the before and after waterfalls from loading our CTO’s website on an iPhone. Using our standard Torbit optimizations, the loading time was 13.81 seconds. After adding in the new localStorage optimizations, the loading time dropped to 6.36 seconds. From the waterfalls below you can see that the page was also visible in half the time and the number of requests was significantly reduced.



I will discussing these new optimizations and lots more at the Velocity conference in just a few weeks. I hope you’ll put it on your schedule.

To take advantage of these new optimizations, just check the “localStorage” filters under the Filters tab inside Torbit. Of course, if you’re not a Torbit user, we hope you’ll sign up today.