Setting the Cache-Control for file assets


(Nic Hubbard) #1

I was looking at our file assets the other day, and I realized that Matrix isn't sending a max-age or expires header for our files. I assume this isn't something that Apache does automatically.

 

Are there some recommended settings for this?  And do we just turn on mod_expires?


How do we control the cache headers of an asset?
(Aleks Bochniak) #2

Can you use .htaccess?


(Nic Hubbard) #3
Can you use .htaccess?

 

I would prefer to just put it in our VirtualHosts file.

 

I know how to do it, just wondered if there was recommended settings.


(Benjamin Pearson) #4
I would prefer to just put it in our VirtualHosts file.

 

I know how to do it, just wondered if there was recommended settings.

 

Not sure, if the Squiz admins have some recommended settings, but Google does: https://developers.google.com/speed/docs/best-practices/caching


(Nic Hubbard) #5
Not sure, if the Squiz admins have some recommended settings, but Google does: https://developers.google.com/speed/docs/best-practices/caching

 

Thanks!