SSI and expires header

Markus Jelsma markus.jelsma at openindex.io
Mon Jun 25 14:12:58 UTC 2012


Hello,

We use SSI for serving a specific file but we want it to be cached by the clients for a few hours. We know SSI removes the Expires header set by the standard headers module so we wrote a small perl_set sub that returns a proper HTTP expires date in the future which we set using the headers_more module. Testing via curl -i returns and checking in the browser confirms the Expires header is set correctly. We also output a Cache-Control header. 

The browser, however, doesn't seem to cache the object so we must do something wrong here. I assume we also need a LastModified header but how can we force to send that header while SSI is on? 

Thanks,
Markus



More information about the nginx mailing list