Howto: Speeding up AJAX web applications with htaccess and mod_expires

Mobility, Open Source, Shockey Monkey, Web 2.0
Comments Off on Howto: Speeding up AJAX web applications with htaccess and mod_expires

After the millionth time of watching my mobile phone choking on loading quarter meg of Javascript of Shockey Monkey’s new mobile rich interface I finally remembered the pain while searching for my lost Blackjack earlier this afternoon. Not only did Katie find it (love yooou honey!) but I also sat down to finally put the pesky Javascript static-code reloads to a grave.

Here is an article on how to use Apache’s mod_expires to enforce selective caching of javascript files.

http://www.vladville.com/using-apache-mod_expires-for-faster-ajax-sites

That sounded like a mouthfull. Here is what it means: I telll your browser how long it needs to cache my Javascript code. One day? One month? One year? My call. By telling it which Javascript libraries do not change often I can force it to cache them and not have to download them every single time. Faster load times, less bandwidth, more efficient experience. And hopefully less need for a phone warranty as you watch that GPRS ghettonet connection struggling with the last few K worse than a fat man with the 26th mile of the marathon.

P.S. Yes, of course I am still working on Shockey Monkey! Lack of hype does not translate into lack of development, there are over 4,000 people using, you didn’t think I’d just let that slide did you? Geez.