From 084a2fb50850defdc551ec3026c868834c7eb7e7 Mon Sep 17 00:00:00 2001 From: Michael Strelan Date: Mon, 5 Mar 2012 12:09:19 +1000 Subject: [PATCH 3/3] 1440534 Gzipped javascript sends wrong Content-Type response header on Litespeed webserver --- .htaccess | 16 ++++++++++++++-- 1 files changed, 14 insertions(+), 2 deletions(-) diff --git a/.htaccess b/.htaccess index a69bdd4..c37f7c5 100644 --- a/.htaccess +++ b/.htaccess @@ -128,11 +128,23 @@ DirectoryIndex index.php index.html index.htm RewriteRule \.css\.gz$ - [T=text/css,E=no-gzip:1] RewriteRule \.js\.gz$ - [T=text/javascript,E=no-gzip:1] - + + # Serve correct content type. + Header set Content-Type text/javascript # Serve correct encoding type. Header set Content-Encoding gzip - # Force proxies to cache gzipped & non-gzipped css/js files separately. + # Force proxies to cache gzipped & non-gzipped js files separately. Header append Vary Accept-Encoding + + + # Serve correct content type. + Header set Content-Type text/css + # Serve correct encoding type. + Header set Content-Encoding gzip + # Force proxies to cache gzipped & non-gzipped css files separately. + Header append Vary Accept-Encoding + + -- 1.7.4