Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Caching - no cache
Message
General information
Forum:
ASP.NET
Category:
Other
Miscellaneous
Thread ID:
00706143
Message ID:
00706158
Views:
19
>How do you insure that there is no caching in an ASP.net page?? Is the default setting for no caching? I found how to extend the cache, but, couldn't find the equivalent of ASP's no-cache or "Response.Expires=0", etc.

I assume you are talking about controlling the cache on the browser. You can always embed straight meta tags in your aspx page. Otherwise, I found this information on MSDN that says that Response.Expires has been depreciated in favor of the Cache property:

"The Expires, ExpiresAbsolute and CacheControl properties have been deprecated in favor of the methods of the HttpCachePolicy class available through the Cache intrinsic object to control the IIS output cache and client caches."

Therefore use something like:
Response.Cache.SetExpires(DateTime.Now.AddSeconds(60));
Its confusing because the Webform Page class also has a cache property used to control the server side ASP.NET cache.
HTH
Previous
Reply
Map
View

Click here to load this message in the networking platform