-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Ran,

On 1/13/2011 3:04 PM, Ran Berenfeld wrote:
> I'm using tomcat 6 for a deployed website (http://www.ichess.co.il)
> and since the beginning, GZIP compression did not work for part of the
> files.

:(

What specific version of Tomcat 6?

> the amazing thing is that the website have several javascript files, some
> quite small
> and some large, and the HTTP headers (for example when viewed using Firefox
> "Live HTTP Headers" plugin) clearly shows that the compression works only
> for the small
> js file, and not for the large file.

So it /does/ work for the small files? Good.

> I tried "playing" with the <Connector> at server.xml many times, and nothing
> works.
> Finally, I just added an external Gzip Tomcat Filter (and that solved the
> problem...)
> 
> Here's the relevant part of my server.xml :
> 
>    <Connector port="80" protocol="HTTP/1.1"
>         compression="1400"

Can you confirm that .js files smaller than 1400 bytes are not
compressed? Just trying to triple-check your configuration.

> compressableMimeType="text/html,text/css,text/javascript"

Can you confirm that all your files' MIME types are text/javascript?

>         URIEncoding="UTF-8"
>         threadPriority="10"/>

Is there a reason you changed the priority of the threads? Presumably,
your request processing threads represent nearly all of the threads
running in the JVM. If they're all at MAX_PRIORITY, you're not really
gaining anything.

What else can you tell us about these "large" Javascript files? Are they
static files loaded directly from the disk, or are they
dynamically-generated? Are you sure that thee content-type is being set
correctly for these files?

Are you using Tomcat standalone or do you have something in front, such
as Apache httpd? Just making sure that Tomcat is doing the compression
for you.

- -chris
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.10 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iEYEARECAAYFAk0vbssACgkQ9CaO5/Lv0PBwkwCdEjaYdMO+kOrHO+rHiQFZSoL1
V3AAmQH3uvGKmMIRwJoubx2mUshv34dE
=5o35
-----END PGP SIGNATURE-----

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org

Reply via email to