Install mod deflate


















The default configuration is already set up to compress HTML, CSS, xml, rss, and javascript, but it isn't configured for three important options:. In the case of Apache 2 on Ubuntu We're going to test the newly configured module to make sure it is working. On the server you just configured, download the JQuery javascript file with the following steps:.

During the download, you should see the filesize will be listed as less than half the size of the original file. In my case Figure B , the download size was Your Apache server is now running an efficient level of compression, without compromising the performance of your server.

This is compression made simple that can give your web server a serious boost. Toy around with the configuration options to find out what levels of compression give you the best performance for your Apache server. You don't want to miss our tips, tutorials, and commentary on the Linux OS and open source applications. Delivered Tuesdays. He's covered a variety of topics for over twenty years and is an avid promoter of open source. 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. 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. Check if the module has been loaded. 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.

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.



0コメント

  • 1000 / 1000