Does Visual Studio Localhost ASP.NET debugging allow caching?

Posted by Joel on Stack Overflow See other posts from Stack Overflow or by Joel
Published on 2010-05-14T15:56:08Z Indexed on 2010/05/14 18:04 UTC
Read the original article Hit count: 430

Filed under:
|
|
|
|

The title pretty much says it all, but here's the issue. I have an generic handler that returns Javascript; the only line of code that deals with caching that I put in is the following:

    context.Response.Cache.SetCacheability(HttpCacheability.Public);
    context.Response.Cache.SetExpires(DateTime.Now.AddYears(1));

    context.Response.ContentType = "text/javascript";
    context.Response.Write("result");

I'm debugging on localhost. out of Visual Studio 2008, (that's "localhost." so fiddler picks it up) and Fiddler2 sees the expire date, but says that the cache header is set to private, and the page isn't being cached. Can anybody see what's going wrong here?

© Stack Overflow or respective owner

Related posts about cache

Related posts about ashx