Cache for static files

Vote:
 

hello

we have the following in our web.config: <staticFile expirationTime="12:0:0" />

if i clear my cache and access www.pension.dk i get all static content and the status on the responce is 200 OK
if i access the page again before the cache expires my browser does not request the cached items, so far so good.

but if i try to access the page after the cache has expired my browser sends an If-Modified-Since and the server responds with a 304 Not Modified and that responce does not contain a new Expires header with a date 12 hours in the future. and the Cache-Control header is just set to provate, no max-age set.

this means that every time i access an page on pension.dk after cache has expired the browser sends an If-Modified-Since request and gets a 304 Not Modified responce for every static resource. 

what i would like to have happen is that the 304 Not Modified responce header includes a Expires header with a date 12 hours in the future, this way the browser will opdate the cache with the new expires date and not request the item again until it expires again.

this behaivor is the same for all browsers.

this is the If-Modified-Since request and 304 Not Modified responce:

Response-headerevis kilde
Cache-Control private
Content-Length 0
Content-Type text/html
Date Tue, 23 Oct 2012 11:24:53 GMT
Etag "1CB138FFA259850"
Server Microsoft-IIS/7.5
X-AspNet-Version 2.0.50727
X-Powered-By ASP.NET
Request-headerevis kilde
Accept text/css,*/*;q=0.1
Accept-Encoding gzip, deflate
Accept-Language da,en-us;q=0.7,en;q=0.3
Connection keep-alive
Cookie __utma=1.1788595876.1338273972.1350103214.1350462067.28; __utmz=1.1338542693.3.2.utmcsr=google|utmccn=(organic)|utmcmd=organic|utmctr=(not%20provided); pension.dk=section=ompensiondanmark
Host www.pension.dk
If-Modified-Since Thu, 24 Jun 2010 11:25:40 GMT
If-None-Match "1CB138FFA259850"
Referer http://www.pension.dk/
User-Agent Mozilla/5.0 (Windows NT 6.1; WOW64; rv:15.0) Gecko/20100101 Firefox/15.0.1
Response Headers From Cache
Cache-Control private
Content-Length 15254
Content-Type text/css
Date Tue, 23 Oct 2012 11:24:53 GMT
Etag "1CB138FFA259850"
Expires Wed, 17 Oct 2012 20:24:25 GMT
Last-Modified Thu, 24 Jun 2010 11:25:40 GMT
Server Microsoft-IIS/7.5
X-AspNet-Version 2.0.50727
X-Powered-By ASP.NET
#62366
Oct 23, 2012 13:44
Vote:
 

oh and the question is: how do i get the behaivor i want, do i have to program a new staticfilehandler or is there a setting in web.config i can add?

#62368
Oct 23, 2012 13:50
This thread is locked and should be used for reference only. Please use the Episerver CMS 7 and earlier versions forum to open new discussions.
* You are NOT allowed to include any hyperlinks in the post because your account hasn't associated to your company. User profile should be updated.