The following warnings occurred:
Warning [2] count(): Parameter must be an array or an object that implements Countable - Line: 802 - File: showthread.php PHP 7.2.24-0ubuntu0.18.04.1 (Linux)
File Line Function
/showthread.php 802 errorHandler->error

Current time: 11-20-2019, 09:29 PM Hello There, Guest! (LoginRegister)

Post Reply 
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Far futures caching, "set" and "unset" not working, but "append" does. WTF?
01-28-2011, 03:49 PM
Post: #1
Far futures caching, "set" and "unset" not working, but "append" does. WTF?
Hi, Has anybody every encountered this with far futures caching?

For some reason "unset" and "set" don't work. "Unset" doesn't remove the header value. And "set", which is supposed to remove the current value and use the new, only adds the new value onto the old resulting in *two* values for a given header item! My host is baffled and I may go nuts.

My goal, for JS is to:
remove etags
remove last modified
set expires modified header - access plus 1 year
set cache control header - access plus 1 year

My .htaccess:
<FilesMatch "\.(js)$">
Header unset Pragma
Header unset ETag
FileETag None
Header unset Expires
Header unset Cache-Control
Header set Cache-Control "max-age=31536000,public"
Header set Expires "A31536000"
Header unset Last-Modified

I realize I shouldn't have to use unset Expires and unset Cache-Control. But even explicitly doing it, it doesn't remove the old values! YSlow shows that my new values are only being appending ONTO the old. So there's TWO values for each. Any ideas what's wrong? Is it possible that a host's server can force these values to remain?

Response header as shown in Yslow:
Content-Encoding gzip
Vary Accept-Encoding
Date Fri, 28 Jan 2011 00:26:05 GMT
Server LiteSpeed
Accept-Ranges bytes
Etag "127f-4d41fdf8-0"
Last-Modified Thu, 27 Jan 2011 23:21:28 GMT
Content-Type application/javascript
Content-Length 2137
Cache-Control max-age=63556926,public, max-age=0
Expires A63556926, Fri, 28 Jan 2011 00:26:05 GMT
Find all posts by this user
Quote this message in a reply
Post Reply 

Messages In This Thread
Far futures caching, "set" and "unset" not working, but "append" does. WTF? - Thompson - 01-28-2011 03:49 PM

Forum Jump:

User(s) browsing this thread: 1 Guest(s)