developer747
developer747

Reputation: 15958

ASP.net page output caching

In asp.net I can set the page output cache to store at the web server or at the browser level.

<%@ OutputCache Duration="#ofseconds"  
    Location="Any | Client | Downstream | Server | None | ServerAndClient %>

I have a couple of questions regarding this

  1. If the page output cache is set to be stored at the browser level, will there still be a postback on refresh click?

  2. Why would I choose web server level page output caching over client caching?

Upvotes: 2

Views: 722

Answers (1)

RickNZ
RickNZ

Reputation: 18652

  1. Yes. Caching a page at the browser (or in a proxy) does not prevent postbacks.

  2. For pages where you are generating the same content for many users. The goal is improved server-side performance. Also, you wouldn't normally use server side caching alone; by default, enabling it on a page also enables client caching. You might use server-only caching in cases where you want to retain a higher level of control over when users see new content.

Upvotes: 2

Related Questions