|
DailyCoding > Web
|
How not to cache a page output in ASP.NET
|
| Explains how not to cache pages in asp.net to avoid them stored at client side |
|
Author
admin on
Jul 31, 2008 |
4 Comments
|
| Rate it |
|
(Rated
4
by
1
people)
|
 |
Loading.. |
|
463 Views
|
|
|
In one of my post, I posted about How to cache a page output in ASP.NET, but sometime you have requirement like the page should never be cached. Every time user request a particular url it should give you fresh version of the page or file. To achieve this simply added Location="None" to the OutputCache directives.
<%@ OutputCache Location="None" VaryByParam="None" %>
Using Location="None" will tell the browser not to cache the page and hence your can prevent the page from saving on temporary internet files on client's machine. This could be useful when you don't want you pages or some particular page to be stored at client side for security reasons.
|
|
ASP.NET
|
Utility
|
|
|
|
|
|
|
Leave a Comment
|
 |
Loading.. |
|
|
|
|
|