Wednesday, October 31, 2007

How to prevent Web pages from Caching on the Client browser?

Today I was confronted by a strange problem which I needed to find a solution to. I needed to prevent a single web page in a web application for caching at the Client's Browser.

This situation would frequently arise when you have a web page displaying some real time data like Banking information, log-in details, etc.

So I finally found a simple solution to add a single attribute in the asp.net web page to help it from NOT caching.

<meta equiv="pragma" content="no-cache">

No comments:

Post a Comment