Why do I need to enable Gzip? A: After Gzip is enabled, the data output to the user's browser will be compressed to reduce the amount of data transmitted over the network and increase the browsing speed. How to enable Gzip? 1. first find httpd. the conf file is applicable to Linux servers. generally, it is in the apache/conf Directory. 2. enable the gzip function and load related modules. The gzip function uses the mod_deflate.so module. The first step is to introduce mod.
Why do I need to enable Gzip?
A: After Gzip is enabled, the data output to the user's browser will be compressed to reduce the amount of data transmitted over the network and increase the browsing speed.
How to enable Gzip?
1. first find the httpd. conf file
For Linux servers
2. enable the gzip function and load related modules:
The gzip function uses the mod_deflate.so module. The first step is to introduce the mod_deflate.so module:
First open the httpd. conf file, search for the mod_deflate.so line, and then remove the "#" comment symbol before the line.
LoadModule deflate_module modules/mod_deflate.so
3. configure gzip. Gzip files are common web files, such as js and css.
Add the following at the end of the configuration file:
DeflateCompressionLevel 6
AddOutputFilter DEFLATE html xml js css jpg gif png