Freigeben über


Controlling HTTP Caching

Is HttpResponse.Cache the preferred way to control caching? HttpResponse is only available in ASP.NET compatibility mode.

No, you don't need ASP.NET compatibility mode to set cache headers. In fact, almost everything from HttpResponse can be done by attaching an HttpResponseMessageProperty to the outbound message. The largest difference is that HttpResponseMessageProperty makes you use a collection of headers rather than having an individual property for each header.

Next time: Best Practice for Channel Shapes

Comments

  • Anonymous
    October 20, 2007
    I've answered this question before but it continues to keep being asked so I'll answer it again. This