View Issue Details
ID | Project | Category | View Status | Date Submitted | Last Update |
---|---|---|---|---|---|
0005586 | OXID eShop (all versions) | 4.08. Cache | public | 2013-12-20 10:27 | 2014-04-10 15:25 |
Reporter | arvydas_vapsva | Assigned To | |||
Priority | high | Severity | major | Reproducibility | always |
Status | closed | Resolution | duplicate | ||
Product Version | 4.8.1 / 5.1.1 | ||||
Target Version | 4.8.5 / 5.1.5 | ||||
Summary | 0005586: Varnish config overrides expiration headers, defined in .htaccess | ||||
Description | Following lines override custom expiration headers, defined in ".htaccess", thus you cannot force browser to cache locally: set resp.http.Cache-Control = "no-cache, no-store, must-revalidate, proxy-revalidate"; set resp.http.Pragma = "no-cache"; set resp.http.Expires = "Tue, 01 Jan 1985 00:00:00 GMT"; | ||||
Tags | htaccess, Varnish | ||||
Theme | Both | ||||
Browser | All | ||||
PHP Version | any | ||||
Database Version | any | ||||
duplicate of | 0005334 | resolved | mantas.vaitkunas | Varnish config disables browser cache for CSS/JS/IMG |
|
This functionality was introduce to ensure that no other proxies stand in between and change caching rules. As Shop makes sure that cache in Varnish are correct by invalidating it on fact not on defined time. Possible workaround would be to remove those lines, as this functionality do not change shop behavior directly. More correct workaround would be to check what file type is requested and do not add additional headers on images and css. Code would look somehow like this: if (req.url !~ "\.(jpg|jpeg|png|gif|bmp|gz|tgz|bz2|tbz|mp3|ogg|(js|css)(\?[0-9]+)?)$") { set resp.http.Cache-Control = "no-cache, no-store, must-revalidate, proxy-revalidate"; set resp.http.Pragma = "no-cache"; set resp.http.Expires = "Tue, 01 Jan 1985 00:00:00 GMT"; } |