Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

I'd like to set the following:

ExpiresActive On
ExpiresByType application/x-flash-swf  "access plus 1 days"
ExpiresByType application/x-shockwave-flash  "access plus 1 days"
<FilesMatch "\.swf$">
 Header set Cache-Control "public"
</FilesMatch>

but I usually set on html

<embed src="http://example.com/flash/example.swf?YYYYMMDDSS" />

What is the difference YYYYMMDDSS and Expires(mod_expires)?

share|improve this question

2 Answers 2

What is the difference YYYYMMDDSS and Expires(mod_expires)?

mod_expires sets the headers in the HTTP protocol, and most caching servers which follow the HTTP specs do exactly what you request with the correct headers.

Using a query parameter with a date as part of a URL, and thus the corresponding GET request doesn't set any expiration. You are depending on the browser to operate the way you expect. This is a bit of a hack and is somewhat uncommon, but I suspect it works.

You can do both if you like.

share|improve this answer

"YYYYMMDDSS" will not be cached proxy server.

You can manual update user cache, change "YYYYMMDDSS".

share|improve this answer
    
Thank you so much . but only that ? –  freddiefujiwra Feb 9 '11 at 8:26
    
You can manual update user cache, change YYYYMMDDSS. –  alvosu Feb 9 '11 at 8:32
    
I believe I have seen proxy servers cache things with query parameters included as part of the URL in a GET request. –  Zoredache Feb 9 '11 at 8:36
    
By default Squid and other Windows proxy don't cache. –  alvosu Feb 9 '11 at 8:41

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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