This project is read-only.
3
Vote

Cache-Control

description

While working with CassiniDev I noticed that my page loads are slower when using cassini vs IIS, I took a look at fiddler and noticed that static files (.css, .jpg) are being re-downloaded for every page. looking further noticed that cassinis adds 'Cache-Control: private' to the response header of images and css files.
 
it would be great if there was an option to turn this feature on or off.
 
Thanks,

comments

keivanbeigi wrote Oct 2, 2010 at 9:26 AM

I did some investigation and the issue seems to be from Request.SendKnownResponseHeader().
the problem is that _specialCaseStaticFileHeaders is being set to the wrong value and the Expires and LastModified are dropped from the header which causes static content not to be cached by the browser. it actually has nothing to do with cache-control

Sky wrote Oct 2, 2010 at 5:36 PM

Yes, you have found a bug in the original cassini source. The fix will be in the next source push. When I close this issue you can pull source or wait for a release package.

Great catch! thank you.

Sky wrote Oct 2, 2010 at 6:03 PM

please confirm that the latest source resolves this issue for you and I will close the ticket.

again, thanks for the bug.

wrote Oct 2, 2010 at 11:17 PM

keivanbeigi wrote Oct 7, 2010 at 11:41 PM

I don't think the issue is fixed. the css files and js files are still downloaded everytime.
Last-Modified is still missing from the header for css, js and image files.

Sky wrote Oct 12, 2010 at 10:53 PM

keiv - thanks, I will give this some attention this week.

wrote Jan 31, 2012 at 10:45 AM

andym1978 wrote Jun 21, 2012 at 4:51 PM

FYI: I noticed that these files seem to be getting cached properly in IE9, but not in Chrome. Strange...

andym1978 wrote Jun 21, 2012 at 4:59 PM

In Chrome, I see that I am sending "Cache-Control:max-age=0" in the header, so that may explain some of the behavior. I need to investigate a bit more...

wrote Feb 22, 2013 at 12:19 AM