Is there any http caching for ASP.Net web forms?

I have an ASP.Net Web Forms application. The blog post, β€œThe CacheCow Series - Part 0: Getting Started and the Basics of Caching,” mentions that Output Caching uses HttpRuntime.Cache behind the scenes -hence not HTTP caching . The request arrives at the server, and the cached response is sent from the server (when the actual cached output is on the server). Thus, all content is sent through the wire.

Is HTTP caching available for ASP.Net web forms (where the response content is not sent from the server if the cache code is valid, but the client takes it from the HTTP cache after receiving information about the validity (only) from the server)?

LITERATURE

+3
source share
1 answer

In fact, the OutputCache directive is used to cache both the client and the server. When you set the Location this directive to Any , Client , Downstream or ServerAndClient , the correct cache response headers are set so that browsers or proxies do not request the same page again and serve the cached version of your page. But keep in mind that these customers may request these pages again.

Location parameters with Cache-Control headers after setting the directive: <%@ OutputCache Location="XXX" Duration="60" VaryByParam="none" %>

  • Client : private, max-age = 60
  • Downstream : public, max-age = 60
  • Any : public
  • ServerAndClient : private, max-age = 60
  • Server : no-cache
  • No output directive : private
+1
source

All Articles