Modern browsers like Internet Explorer, Firefox, Opera etc support gzip compressed content. These browsers are capable of uncompressing gzip data into plain text. Servers like Apache, Tomcat, JBoss etc support gzip compression too. Hence if gzip is enabled in such servers, the response is first compressed and then sent to the client. This increases performance by many folds.
How to enable it ?
-
Edit file "/conf/server.xml"
-
Add to the HTTP Connector configuration the following attributes:
-
compression="on“
-
compressableMimeType="text/html,text/xml,text/css,text/javascript……
-
compressionMinSize="2048" (recommended)
-
noCompressionUserAgents="gozilla, traviata“ (optional)
For instance, where it says:
Add this: