balaweblog
balaweblog

Reputation: 15470

How to determine if ASP.NET page is in cache or not?

I need to find whether the web page is cached or not. That s loaded newly or its appeared in cache.

Upvotes: 0

Views: 864

Answers (2)

Salamander2007
Salamander2007

Reputation: 6394

Include generated timestamp somewhere in your response, and store the the timestamp somewhere in the server (maybe in the cache object). That way you know the version of the page by examining those values.

If you could elaborate more on the scenario you're facing, I'm sure you'll get better answer.

Upvotes: 3

Dave Anderson
Dave Anderson

Reputation: 12294

You have either client-side or server-side caching and these are discrete in that they have no knowledge of each other.

On the server-side examine the Response.Cache object.

Upvotes: 1

Related Questions