I am trying to load an swf flash file from my lighttpd web server.

expire.url "/static/swf" => "modification plus 0 seconds"

However, when I reload from the web browser, chrome seems to load the file from cache. Same with firefox. In this one with firebug I see the files are loading from cache although the header is showing a "Cache-Control" of "max-age=0"

Could you tell me why chrome or firefox use cache instead of loading the files when I am telling that I do not want to cache these type of files.

Thank you.

  • I think what may be missing is the "must-revalidate" Cache-Control header, but I don't know how to make lighttpd issue that header in addition to max-age. – DerfK Apr 4 '11 at 16:19

It's possible, that 0 means infinite, as usual.

  • Expires give me the same time as I am making the request. If 0 means infinite, could you tell me how could I change this value in order to get the results I am looking for. – vitidandu Apr 4 '11 at 15:51
$HTTP["url"] =~ ".(swf)$" {
etag.use-inode = "disable"
etag.use-mtime = "disable"
etag.use-size = "disable"
static-file.etags = "disable"

I have tried this, but 304 Not Modified is responded.

curl -I http://static.lucas.net/static/swf/titles.swf
HTTP/1.1 200 OK
Content-Type: application/x-shockwave-flash
Accept-Ranges: bytes
**Last-Modified**: Fri, 01 Apr 2011 09:34:05 GMT

Last-Modified is the problem.

  • Ok. The problem was that I had not enable the mod_setenv. The solution is make it available. – vitidandu Apr 5 '11 at 14:28

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.