Boost HTACCESS: Revision

#deflate html, txt, css, js, json, xml, htc:

<IfModule mod_deflate.c>
#  html, txt, css, js, json, xml, htc:
    AddOutputFilterByType DEFLATE text/html text/plain text/css application/json
    AddOutputFilterByType DEFLATE text/javascript application/javascript application/x-javascript
    AddOutputFilterByType DEFLATE text/xml application/xml text/x-component
    BrowserMatch ^Mozilla/4 gzip-only-text/html
    BrowserMatch ^Mozilla/4\.[0678] no-gzip
    BrowserMatch \bMSIE !no-gzip


#Always force latest IE rendering engine (even in intranet) & Chrome Frame

# Force the latest IE version, in various cases when it may fall back to IE7 mode
# Use ChromeFrame if it's installed for a better experience for the poor IE folk
<IfModule mod_setenvif.c>
  <IfModule mod_headers.c>
    BrowserMatch MSIE ie
    Header set X-UA-Compatible "IE=Edge,chrome=1" env=ie
  </IfModule>
</IfModule>

# Make sure proxies don’t deliver the wrong content.
#Because X-UA-Compatible isn't sent to non-IE (to save header bytes),
# We need to inform proxies that content changes based on UA
<IfModule mod_headers.c>   
    Header append Vary User-Agent env=!dont-vary
# Cache control is set only if mod_headers is enabled, so that's unncessary to declare
</IfModule>


#gzip js: Grab jQuery & jQuery UI & jQuery-Form & jquery.easing from a zgip

#added js.jgz files in /vendors/jquery/

# gzip js
RewriteCond %{HTTP:Accept-Encoding} gzip
RewriteCond %{REQUEST_FILENAME}.jgz -f
RewriteRule (.*)\.js$ $1\.js.jgz [L]
AddType "text/javascript" .js.jgz
AddEncoding gzip .jgz

History