apache - .htaccess cache control max age doesn't work -


i have problem setting cache expire date on website. code use in .htaccess file:

<filesmatch "\.(xml|txt|css|js)$">     header set cache-control "max-age=7200, proxy-revalidate" </filesmatch> 

the file types mentioned should have expire date of 2 hours, after hard refresh see these files have expiration date of 1 week. example, select .css file in chrome inspect page , see information:

accept-ranges:bytes

cache-control:max-age=8000, proxy-revalidate

connection:close

content-encoding:gzip

content-length:20229

content-type:text/css

date:wed, 26 jul 2017 09:02:31 gmt

etag:"1c8c1-55513528cb363-gzip"

expires:wed, 02 aug 2017 09:02:31 gmt

last-modified:mon, 24 jul 2017 17:12:41 gmt

server:apache

vary:accept-encoding

the cache control max age working, why file's expire date 1 week after? kind of server cache or doing wrong?

just found out cache-control:max-age overwrites expires tag ok.


Comments

Popular posts from this blog

python - Selenium remoteWebDriver (& SauceLabs) Firefox moseMoveTo action exception -

html - How to custom Bootstrap grid height? -

transpose - Maple isnt executing function but prints function term -