Quantcast
Channel: BulletProof Security Forum » All Posts
Viewing all articles
Browse latest Browse all 12477

Gzip compression – custom .htaccess code

$
0
0

Ed,

I ran a GTmetrix test on my site and was advised to add Gzip compression to speed it up

and this is the code I was told to add to my .htaccess file:
<pre id=”apache_code”># compress text, HTML, JavaScript, CSS, and XML
AddOutputFilterByType DEFLATE text/plain
AddOutputFilterByType DEFLATE text/html
AddOutputFilterByType DEFLATE text/xml
AddOutputFilterByType DEFLATE text/css
AddOutputFilterByType DEFLATE application/xml
AddOutputFilterByType DEFLATE application/xhtml+xml
AddOutputFilterByType DEFLATE application/rss+xml
AddOutputFilterByType DEFLATE application/javascript
AddOutputFilterByType DEFLATE application/x-javascript

# remove browser bugs
BrowserMatch ^Mozilla/4 gzip-only-text/html
BrowserMatch ^Mozilla/4\.0[678] no-gzip
BrowserMatch \bMSIE !no-gzip !gzip-only-text/html
Header append Vary User-Agent

Got two questions:
1. Will adding this compromise security on my site?
2. Which .htaccess file should it be added to?

regards,
Chris Moon

  • This topic was modified 6 hours, 8 minutes ago by Avatar of Chris Moon Chris Moon.

Viewing all articles
Browse latest Browse all 12477

Trending Articles