Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Next revision
Previous revision
Next revision Both sides next revision
litespeed_wiki:config:gzip-compression [2015/07/30 19:20]
Michael Alegre created
litespeed_wiki:config:gzip-compression [2017/05/19 15:42]
Eric Leu [Compression verification]
Line 22: Line 22:
  
 Both static and dynamic file compression can be tuned to your server and network capabilities using Compression Level (Static File) and Compression Level (Dynamic Content). Better compression (a higher number) will save bandwidth, but will use more memory and CPU cycles. Your specific CPU and bandwidth saving needs determine the ideal configuration for your system. Both static and dynamic file compression can be tuned to your server and network capabilities using Compression Level (Static File) and Compression Level (Dynamic Content). Better compression (a higher number) will save bandwidth, but will use more memory and CPU cycles. Your specific CPU and bandwidth saving needs determine the ideal configuration for your system.
 +
 +=====Compression verification=====
 +
 +After setting up by above guidance. You can verify it by opening URL with ''​Server_IP:​Port_num/​path_to_file''​ on browser, then You will see **Content-Encoding:​ gzip** by entering button F12(DevTools) → Network → Headers as the following picture.
 +
 +{{:​litespeed_wiki:​config:​gzip_true.jpg?​|}}
 +
 +If the page returned with none compressed which means no Content-Encoding inside the header on browser, then you should check if you are not using pre-defined MIME type.
 +E.g. ''​text/​xml''​ is **not** pre-defined MIME type, so ''​text/​*''​ won’t pick it up.
 +
 +** How to check MIME type pre-defined or not? **
 +
 +Filter “MIMe type”(e.g. ''​text/​xml''​) in the following path:
 +Web Admin Console → Server → General → General Settings → MIME Settings → Click ''​$SERVER_ROOT/​conf/​mime.properties''​
 +
 +If the filter result is empty, then there are two methods to solve the problem you met:  ​
 +  * Method 1: Please append MIME type(E.g. ''​text/​xml''​) manually in the following path: Web Admin Console → Server → Tuning → GZIP Compression → Edit → Append Compressible Types → Save → Graceful Restart {{:​litespeed_wiki:​config:​compressible_type.jpg?​|}}
 +
 +  * Method 2: Please add MIME type entry(E.g.Suffixes:''​xml'',​ Mime type:''​text/​xml''​) manually in the following path: Web Admin Console → Server → General → General Settings → MIME Settings → Click ''​$SERVER_ROOT/​conf/​mime.properties''​ → Add → Enter Suffixes and Mime Type → Save → Graceful restart. \\ {{:​litespeed_wiki:​config:​mimetype-add.png?​|}} {{:​litespeed_wiki:​config:​mime-entry.png?​|}}
 +  * From above examples, you can add MIME type as you want, e.g. text/css, text/js, text/x-js.
  • Admin
  • Last modified: 2019/09/16 14:34
  • by Lisa Clarke