tag:blogger.com,1999:blog-865923359735383241.post7279395612430073003..comments2023-10-29T07:27:09.012-06:00Comments on Ccna final exam - java, php, javascript, ios, cshap all in one: How to Specify "Vary: Accept-Encoding' header in .htaccessUnknownnoreply@blogger.comBlogger2125tag:blogger.com,1999:blog-865923359735383241.post-60414865308124910692012-06-03T20:35:59.213-06:002012-06-03T20:35:59.213-06:00I'm afraid Aularon didn't provide enough s...I'm afraid Aularon didn't provide enough steps to complete the process. With a little trial and error, I was able to successfully enable Gzipping on my dedicated WHM server.<br /><br />Below are the steps:<br /><br /><br />Run EasyApache within WHM, select Deflate within the Exhaustive Options list, and rebuild the server.<br />Once done, goto Services Configuration >> Apache Configuration >> Include Editor >> Post VirtualHost Include, select All Versions, and then paste the mod_headers.c and mod_headers.c code (listed above in Aularon's post) on top of on another within the input field.<br />Once saved, I was seeing a 75.36% data savings on average! You can run a before and after test by using this HTTP Compression tool to see your own results: http://www.whatsmyip.org/http_compression/<br /><br /><br />Hope this works for you all!<br /><br /><br />MattUserhttps://www.blogger.com/profile/11557173689529910046noreply@blogger.comtag:blogger.com,1999:blog-865923359735383241.post-48668874064573739512012-06-03T20:35:58.072-06:002012-06-03T20:35:58.072-06:00I guess it's meant that you enable gzip compre...I guess it's meant that you enable gzip compression for your css and js files, cuz that will enable the client to receive both gzip-encoded content and a plain content.<br /><br />This is how to do it in apache2:<br /><br /><IfModule mod_deflate.c><br /> #The following line is enough for .js and .css<br /> AddOutputFilter DEFLATE js css<br /><br /> #The following line also enables compression by file content type, for the following list of Content-Type:s<br /> AddOutputFilterByType DEFLATE text/html text/plain text/xml application/xml<br /><br /> #The following lines are to avoid bugs with some browsers<br /> BrowserMatch ^Mozilla/4 gzip-only-text/html<br /> BrowserMatch ^Mozilla/4\.0[678] no-gzip<br /> BrowserMatch \bMSIE !no-gzip !gzip-only-text/html <br /></IfModule><br /><br /><br />EDIT:<br />Here's how to add the Vary Accept-Encoding header: [src]<br /><br /><IfModule mod_headers.c><br /> <FilesMatch "\.(js|css|xml|gz)$"><br /> Header append Vary Accept-Encoding<br /> </FilesMatch><br /></IfModule>Userhttps://www.blogger.com/profile/11557173689529910046noreply@blogger.com