Change record status: 
Project: 
Introduced in branch: 
9.5.x
Introduced in version: 
9.5.7
Description: 

The htaccess rewrite rule that enables static gzipped JavaScript and CSS aggregates to be served to browsers that accept gzip encoding has been modified so that it performs less checks for file existence. This should not cause any functional change except for the performance improvement, however sites should ensure that the change is applied:

+++ b/.htaccess
+++ b/.htaccess
@@ -151,12 +151,12 @@ AddEncoding gzip svgz

@@ -151,12 +151,12 @@ AddEncoding gzip svgz
     # Serve gzip compressed CSS files if they exist and the client accepts gzip.
     RewriteCond %{HTTP:Accept-encoding} gzip
     RewriteCond %{REQUEST_FILENAME}\.gz -s
-    RewriteRule ^(.*)\.css $1\.css\.gz [QSA]
+    RewriteRule ^(.*css_[a-zA-Z0-9-_]+)\.css$ $1\.css\.gz [QSA]
 
     # Serve gzip compressed JS files if they exist and the client accepts gzip.
     RewriteCond %{HTTP:Accept-encoding} gzip
     RewriteCond %{REQUEST_FILENAME}\.gz -s
-    RewriteRule ^(.*)\.js $1\.js\.gz [QSA]
+    RewriteRule ^(.*js_[a-zA-Z0-9-_]+)\.js$ $1\.js\.gz [QSA]
 
Impacts: 
Site builders, administrators, editors

Comments

stefan.korn’s picture

I suppose this is finally fixed in 9.5.9.

9.5.7 and 9.5.8 have an issue with gzip compression of css and js (no gzip compression ...)