Software Reality
Programming with
a dose of satire.

Site Map Search


Agile Development
 
Extreme Programming
 
Code Generation


Articles
Lifecycle
Design
Programming
Soapbox
Reviews
Cthulhu

Java Swing
Swing's greatest threat isn't SWT, it's Flash
Swing Survival Guide


 
Check out our ageing Reviews Section


Use Case Driven
Use Case Driven Object Modeling with UML: Theory and Practice
Get from use cases to working, maintainable source code. Examples use Spring Framework, JUnit and Enterprise Architect

Agile UML
Agile Development with ICONIX Process
A practical subset of agile development techniques, illustrated by example

Get Controversial!
Extreme Programming Refactored
Extreme Programming with a dose of satire
Available now:



Programming

Accelerate your Website With GZIP Compression

By Dino Fancellu
March 15, 2004

We recently configured SoftwareReality.com to use GZIP compression, and got an instant improvement in load times. This page includes some notes and further reading on how to configure your website to use GZIP.

The front page has gone from a rather hefty 28260 byte download to a mere 5794 bytes. The improvement of the stylesheet page (style.css) was even better - 10753 bytes compressed down to 1444 bytes! We saw similar results at Javelinsoft.com.

It seems to average out at about 80% compression, 4/5 reduction. Images can also be compressed, but it's probably better to leave them well alone, as they likely already are compressed (in fact, adding GZIP compression can sometimes make images larger to download).

This top-1000 survey of company websites that use (or don't use) compression makes for interesting browsing. Most companies and most websites don't bother with compression. The result is a bloated web experience, wasted bandwidth, and super-slow page downloads for poor 56K modem users. (Of course, we can take this moral high ground now that SoftwareReality is compressed!)

Slashdot, on the other hand, is lovely and GZIPped - absolutely essential for a site that attracts hundreds of thousands of hits each day.

 

Accelerating Your Own Website - Some Pointers

If you want to configure your own website to use GZIP, it's pretty straightforward - although there are one or two "gotchas" to be aware of.

If your website uses Resin, it's easy - just put:

<filter-mapping url-pattern='/*'
filter-name='com.caucho.http.filter.GzipFilter'/>

inside your <host> or <web-app> - but see the comments on pdf files below.

Similarly in Tomcat, just add compression="on" to your coyote connector, and you'll get gzip on larger pages. See their config page for more info.

If you have Apache at the front, leave it to Apache. See this page for Apache 1.3, or this page for Apache 2.x.

(Don't forget to load module inside httpd.conf, e.g. LoadModule deflate_module modules/mod_deflate.so)

There's also a whole site about web compression at webcompression.org - definitely worth a look.

Unfortunately, GZIP breaks pdf downloads (e.g. the EJB's 101 Damnations file).

So you'd need to configure a more selective URL pattern to make sure not everything gets compressed (e.g. only compress *.jsp).

 

Talkback

Post a new message

Message Index:

GZIP in iPlanet server
sathya sat_adi2002

Need a way to compress a JSP..
Sridhar sridhar_shanbogh@yahoo.com

Need a way to compress a JSP..
Sridhar sridhar_shanbogh@yahoo.co.in

Will iplanet support gzip compression?
Rajendra ugrani_open@yahoo.co.in

Doubt in GzipFilter
saravanan jayasaravanan@gmail.com

Gzip corrupting the tabcontainer ajaxtool
amit amit_deoria@indiatimes.com

enable GZip compression on iPlanet
Arun arunbea@gmail.com

Helpful
bobby monkey@yahoo.com

The Messages:
GZIP in iPlanet server
How do i enable gzip in iPlanet web server???
sathya sat_adi2002

Thu Jul 01 10:10:25 BST 2004
Need a way to compress a JSP..

I hav an appln developed using jsp/struts/ejb..

For the purpose of optimizing it.. want a sample program tht compress the jsp before sending the response..

Any suggestions.. Welcome please..

With Thnks,
-Sridhar

Sridhar sridhar_shanbogh@yahoo.com
Karnataka, India

Wed Oct 12 07:58:16 BST 2005
Need a way to compress a JSP..

I hav an appln developed using jsp/struts/ejb..

For the purpose of optimizing it.. want a sample program tht compress the jsp before sending the response..

Any suggestions.. Welcome please..

With Thnks,
-Sridhar

Sridhar sridhar_shanbogh@yahoo.co.in
Karnataka, India

Wed Oct 12 07:59:04 BST 2005
Will iplanet support gzip compression?
Can somebody tell me whether iplanet support gzip?If yes how to configure the settings?
Rajendra ugrani_open@yahoo.co.in
Bangalore, India

Mon Jun 05 16:46:42 BST 2006
Doubt in GzipFilter
I need to download my product fastly from remote server it is in us.
I am implemented what u said, But GzipFilter is not support in tomcate how to configure this and any idea pl. tell me. I am Using IE 6.0.

saravanan jayasaravanan@gmail.com
chennai, India

Sat Aug 25 12:49:56 BST 2007
Gzip corrupting the tabcontainer ajaxtool
implementing gzip Gzip corrupting the tabcontainer ajaxtool in the website
amit amit_deoria@indiatimes.com
gurgaon, India

Fri Apr 11 12:37:27 BST 2008
enable GZip compression on iPlanet
Can any one help me how to enable GZip compression on iPlanet So that my webserver act fastly?

Arun arunbea@gmail.com
Delhi, India

Tue Oct 07 13:36:52 BST 2008
Helpful
This was one of the most usefull sites about gzip/

adamwe.com
ninjag.com

bobby monkey@yahoo.com
tx, usa

Tue Oct 21 21:21:17 BST 2008

Post a new message

 

More articles by Dino Fancellu:

Code-Generate Enterprise Applications With JGenerator

How to Write a Functional Specification

 

<< Back to Programming

<< Back to Software Reality

 

All trademarks and copyrights on this page are owned by their respective owners.
Stories and articles are owned by the original author.
All the rest Copyright © 1998-2008 Matt Stephens. ALL RIGHTS RESERVED.