![]() |
Settting Expires/Cache-Control Headers buggy
Hello,
I am a customer to a company that is running lightspeed. I am trying to configure Expires/Cache Control Headers. It seems in some file types there are some default rules that are added to my .htaccess provided rules. I will post two cases for reference. One html file that is working as expected (no Expires/Cache-Control Headers by default, the .htaccess rules are applied correctly) and another with a js file that the bug is manifested ( default Expires/Cache-Control Headers do exist, the .htaccess rules are mixed with the default). HTML FILE ========== ## FIRST EXPIRES (AND MAX AGE) <IfModule mod_expires.c> ExpiresActive On ExpiresDefault "access plus 120 seconds" </IfModule> ## THEN CACHE CONTROL FOR FINER CONTROL Header Set Cache-Control "must-revalidate" RESPONSE HEADERS --------------- Accept-Ranges: bytes Cache-Control: must-revalidate, max-age=120 Connection: close Content-Encoding: gzip Content-Length: 4949 Content-Type: text/html Date: Thu, 10 May 2012 11:02:28 GMT Etag: "42e8-4fa957f7-0" Expires: Thu, 10 May 2012 11:04:28 GMT Last-Modified: Tue, 08 May 2012 17:29:27 GMT Server: LiteSpeed Vary: Accept-Encoding JS FILE (BUGGY) ======== <FilesMatch "\.(js)$"> Header Set Expires "Thu, 10 May 2012 00:00:01 GMT" Header Set Cache-Control "no-cache, must-revalidate" </FilesMatch> RESPONSE HEADERS -------------------- Accept-Ranges: bytes Cache-Control: no-cache, must-revalidate, max-age=604800 <====== MIXED Connection: close Content-Encoding: gzip Content-Length: 319 Content-Type: application/javascript Date: Thu, 10 May 2012 11:05:26 GMT Etag: "1d0-4fab9b48-0" Expires: Thu, 10 May 2012 00:00:01 GMT, Thu, 17 May 2012 11:05:26 GMT <== MIXED Last-Modified: Thu, 10 May 2012 10:41:12 GMT Server: LiteSpeed Vary: Accept-Encoding |
"application/x-javascript=A604800, application/javascript=A604800" in Expires settings (Admin Console => Configuration => Server => General) needs to be removed.
|
Default
Hello,
Then I suppose that there would not be any default settings that the hosting provider will want (logically) to set. But still I consider this a bug as the apache manual says for the Header Set command that it replaces the header. In this case the header is apended. |
| All times are GMT -7. The time now is 04:43 AM. |