[Neos] Expires header for resources in Neos site

Marcin Ryzycki marcin at ryzycki.com
Sat Oct 25 19:16:26 CEST 2014


Does it have to be for Apache?
It's pretty simple on Nginx. In the server {} context you add:

location ~* \.(?:jpe?g|gif|png|ico|swf|svg|eot|ttf|otf|woff|htc|css|js)$ {
  expires max;
}

Which sets Expires and Cache-Control headers. Then the next request to 
sample .css file results with:

HTTP/1.1 304 Not Modified
Server: nginx
Date: Sat, 25 Oct 2014 17:09:30 GMT
Last-Modified: Fri, 24 Oct 2014 23:27:30 GMT
ETag: "544ae062-24698"
Expires: Thu, 31 Dec 2037 23:55:55 GMT
Cache-Control: max-age=315360000

M.

On 2014-10-23 07:50:57 +0000, Visay Keo said:

> Hello,
> 
> Does anyone has a practice of managing expire header for neos site's resources?
> 
> What would you add to Web/.htaccess <IfModule mod_expires.c> section?
> 
> Cheers,
> Visay




More information about the Neos mailing list