E-com DevBlog Spider-ball-vacuum

30Jul/083

Web Developer Training: Compression

I may be jumping the gun here, but I thought I'd post the training a day early.  Yes that's right, I have another training session that may be of interest.  This one has to do with gzip/deflate and various js compression engines (JSMin, PACKER, and YUI).  I may have thrown some other things in there, but I wrote most of this last week, so I can't really remember :) .

Let me know if there are bugs to be fixed, or if you have anything you'd like to add.

Web Developer Training: Compression

Print This Post Print This Post
Comments (3) Trackbacks (0)
  1. ‘And, has thou slain the Javascript?
    Come to my arms, my beamish boy!
    O frabjous day! Callooh! Callay!’
    He chortled in his joy.

  2. To enable compression on everything except for what you exclude it’s best to use the httpd.conf file rather than .htaccess files. Use the following directive for everything on your server.

    # Insert filter
    SetOutputFilter DEFLATE

    # Netscape 4.x has some problems…
    BrowserMatch ^Mozilla/4 gzip-only-text/html

    # Netscape 4.06-4.08 have some more problems
    BrowserMatch ^Mozilla/4\.0[678] no-gzip

    # Don’t compress images
    SetEnvIfNoCase Request_URI \.gif$ no-gzip dont-vary
    SetEnvIfNoCase Request_URI \.jpg$ no-gzip dont-vary
    SetEnvIfNoCase Request_URI \.png$ no-gzip dont-vary

    # Make sure proxies don’t deliver the wrong content
    Header Append Vary User-Agent env=!dont-vary

  3. Thanks Drew! I’ll throw that out in the mini site (for those who don’t read the comments ;) )


Leave a comment

(required)

No trackbacks yet.