GZIP is not working for all files in Tomcat 7
Issue
Compression is working for most files, but there are files with Content-Type=application/javascript that are sent uncompressed. In the server.xml, compression is set to on:
<Connector port="8080" protocol="HTTP/1.1"
connectionTimeout="10000"
compression="on"
compressionMinSize="1024"
compressableMimeType="text/html,text/xml,text/css,text/javascript,application/javascript"
redirectPort="8443" />
Environment
- JBoss Web Server (EWS) 2.x
- Tomcat 7
Subscriber exclusive content
A Red Hat subscription provides unlimited access to our knowledgebase of over 48,000 articles and solutions.
Welcome! Check out the Getting Started with Red Hat page for quick tours and guides for common tasks.
