Ajax Optimisation Techniques

Ajax Optimization Techniques: Working with Large Ajax Applications
Kevin Henrikson, Principal Engineer, Zimbra

Some verbose notes on what they (Zimbra) have found works in order to optimise the slew of Javascript that needs to go to the browser these days:

Compress – quicker download

Combine images , use CSS to grey out rather than double number of images

JSMin – javascript modifier but can mangle your code

ShrinkSafe (mozilla rhino based) works better

mod_qzip or mod_deflate – on the fly compression but pay CPU cost on each request

most other tools suck as not designed for the scale of todays apps

Netvibes as an example – 85% of the total app is Javascript that weighs it down

Combine javascript files

Apply shrinksafe 25% red

Gzip to compress 77% red

Total ~83% reduction

Caching – WHY? Reduce requests for example, http://tamperdata.mozdev.org

Add headers to HTTP requests like mod_rewrite or use a caching proxy like squid

Caching – Digg.com

What Else?

DOMcontentloaded (and friends)

Firebug – web debugging eveolved

Hidden <div> image pre-cache

No comments yet

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: