Mod_deflate setup


















As pointed out by Falko, on the serverside, you trade of CPU for memory disguised as network usage. In most webserver situations you have lots of CPU, but not enough memory. That's why zipping content helps in most situations on the server too.

Your guide works like a breeze, thank you very much! I do have a slight problem though: in de deflate log, requests that are not zipped like images also appear there. Can it be changed so only zipped requests are logged there? That would make a nice way to generate a daily report on how much traffic has been saved.

I have tried this both on Fedora Core 4 and 5, it really frustrates me that it just won't work and I can't even see why not. Can't find any information on the net either. In the end I ended up compressing my CSS files to ". My PHP generated output is fine, as I can just enable compression in my php. Is there a way to explicitly exlude files by it's MIME type instead of by the file extension? This feature is only available to subscribers. Get your subscription here. Then you can compare the result with the original file on your site again with the ls command:.

Installation Configuration Testing Conclusion. Where would you like to share this to? Twitter Reddit Hacker News Facebook. Share link Tutorial share link. Sign Up. DigitalOcean home. Community Control Panel. Hacktoberfest Contribute to Open Source. By Toli Published on June 12, Prerequisites This guide has been tested on CentOS 7. This file is part of the core httpd package which you should already have installed per the previously mentioned prerequisites.

Also, the web server should be able to open this file. When downloaded in the above manner the file jquery As a matter of fact, this is not exactly the same original JavaScript file, and it should be additionally extracted by the client, causing some overhead on the client side too. However, the size transferred over the network will be only 83KB which is more than three times smaller than the original file K.

You can confirm the above calculation first by checking the size of the downloaded file with the Linux command for listing the directory contents ls like this:. Then you can compare the result with the original file on your site again with the ls command:. Installation Configuration Testing Conclusion.

Where would you like to share this to? Twitter Reddit Hacker News Facebook. Share link Tutorial share link. Sign Up. DigitalOcean home. Community Control Panel. Hacktoberfest Contribute to Open Source. Make sure to restart Apache if you decide to apply any such changes.

For the test you will need a text file of at least a few hundred KBs which should become smaller when compressed. Thus the file will be available at the root directory of your default site. If the client does not support compression the file will be sent as is. Once the example test file is uploaded to your site download it with wget.

You can perform this test either from your local machine or from the Droplet. In the above example you are downloading the jquery To make use of compression we pass the extra wget header argument Accept-Encoding: gzip.

When downloaded in the above manner the file jquery As a matter of fact, this is not exactly the same original JavaScript file, and it should be additionally extracted by the client, causing some overhead on the client side too.



0コメント

  • 1000 / 1000