Aliasghar Bahrami
Aliasghar Bahrami

Reputation: 267

Caching not work after postback asp.net

I have An asp.net Page And Set OutPutCashing Location="Client" when i load page and reload , page load not work but when click a buttom and postback page , caching not working I Need page load not run

Upvotes: 1

Views: 55

Answers (1)

Tummala Krishna Kishore
Tummala Krishna Kishore

Reputation: 8271

According to RFC 2616 - Hypertext Transfer Protocol -- HTTP/1.1:

Some HTTP methods MUST cause a cache to invalidate an entity. This is either the entity referred to by the Request-URI, or by the Location or Content-Location headers (if present). These methods are:

  • PUT
  • DELETE
  • POST

So, to make cache work, you need to convert your POST to GET.

Upvotes: 3

Related Questions