简体   繁体   中英

Compression of content on Apache and Tomcat

I have Apache configured to compress content from web app running on Tomcat. Also the application uses Compression Filter.

How apache handle such situation when it receives compressed content and it's setup to compress content too.

Does Apache just shift the content to client or unzip content first and then compress it again?

Normally, you have some filters configured on Apache mod_gzip, like,

mod_gzip_item_include         file       \.html$
mod_gzip_item_include         file       \.js$
mod_gzip_item_include         file       \.css$

The Tomcat compressed content will be simply passed to client without change.

I wouldn't recommend enabling compression on both. Apache does better job because it supports GZIP. Tomcat can only support inflate.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM