Skip to content

jQuery spring cleaning

jQuery just recently released their 1.2 version.  This spurred me to get some of my mini-projects done and clean up my cookbook area.  I also FINALLY figured out how to Gzip my JavaScript files.  There might be an easier way, but here is how I did it.

  1. Rename the JavaScript files from .js to .php.  All of them. (And reference them in my html with php, not js.)
  2. At the top of each JS, I put <?php ob_start(“ob_gzhandler”); ?>
  3. At the bottom of each JS, I put <?php ob_flush();?>
  4. Now, all of my JS is gzipped up and much smaller than before. 116k down to 36k!

I couldn’t figure out how to keep them as JS files and still make it work.

Another fun demo I made is a collaboration with Ben Nadel.  It’s a nearly useless jQuery Vibrator Plugin.  It has one use.  It’s sort of fun!

I also have been experimenting with a new API browser for jQuery. This one is much harder to accomplish.  I got pretty far last night, but there is alot more to do.  I hope I don’t get stuck.  I really would like to figure it out.  I also added Google Analytics to all of my demos.

So in the past couple of days, I made good progress and completed a few items.  I need to follow through and do more.

Published inUncategorized

3 Comments

  1. “Nothing much was accomplished today, but some easy things were added to my list, so I should accomplish something tomorrow.” -Anonymous

    Keep up the good work Glen.

  2. Mike Mike

    But I don’t think they are cached now…

  3. I just checked my cache. The php files are cached just like html or js files.

Leave a Reply

%d bloggers like this: