LiteSpeed Technologies
Download Download     Blog Blog     Wiki Wiki     Forum Forum     Store     Contact Contact    

Go Back   LiteSpeed Support Forums > LiteSpeed Web Server > Bug Reports > Settting Expires/Cache-Control Headers buggy

Reply
 
Thread Tools Display Modes
  #1  
Old 05-10-2012, 04:15 AM
basos basos is offline
New Member
 
Join Date: May 2012
Posts: 2
Default 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
Reply With Quote
  #2  
Old 05-10-2012, 11:11 AM
webizen webizen is offline
LiteSpeed Staff
 
Join Date: Oct 2010
Posts: 2,338
"application/x-javascript=A604800, application/javascript=A604800" in Expires settings (Admin Console => Configuration => Server => General) needs to be removed.
Reply With Quote
  #3  
Old 05-10-2012, 11:15 AM
basos basos is offline
New Member
 
Join Date: May 2012
Posts: 2
Default 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.
Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -7. The time now is 04:24 PM.



- Archive - Top
© Copyright 2003-2011 LiteSpeed Technologies, Inc. All rights reserved. Privacy Policy.