To reduce network traffic, you can compress HTTP responses in gzip format. Set it up as follows.
1
Edit the server.xml file
Open the
3RABBITZ_HOME/tomcat/conf/server.xmlfile.Add the following attributes to the
Connectortag.
<Connector
protocol="HTTP/1.1"
port="1975"
redirectPort="8443"
connectionTimeout="20000"
URIEncoding="UTF-8"
maxPostSize="-1"
Server="3Rabbitz"
relaxedQueryChars="^`\|{}[]"
compressibleMimeType="text/html,text/css,application/javascript,application/json"
compression="on"
compressionMinSize="2048"
useSendfile="false"
/>The attributes to add to the Connector tag are as follows.
Attribute | Recommended value | Description |
|---|---|---|
compressibleMimeType | text/html,text/css,application/javascript,application/json | The response types to compress |
compression | on | on turns compression on, and off turns it off. The default is off. |
compressionMinSize | 2048 | The minimum size for gzip compression, in bytes. Compressing even small responses can slow down the server. |
useSendfile | false | Whether files are sent at the kernel level. The default is true. When it is true, large files are not compressed, so set it to false to compress all responses. |
2
Restart ManualWorks.
After you edit the server.xml file, you must restart ManualWorks.
3
Check whether gzip compression is applied
In the Network tab of the web browser developer tools, check the 1Content-Encoding of the server response.
This depends on the compressionMinSize attribute, so small responses are not compressed with gzip.