0

I have frequently change a page in my web application per day or per week. while requsting that page via browser, i will get only old updates . so For get to render new updates in that page, i need to refresh that page several times.

Can you please suggest any logic to render my wepapge with latest changes while requesting that page in Programatical way? i have developed my wep app using ASP.NET MVC3.0 platform.

(or) if any changes , we need to make in IIS server[website host server].

Please suggest is this process possible to do in wep app?

Anandh
  • 167
  • 5
  • 15

1 Answers1

0

You can explicitly tell a browser not to cache the result of an action by placing the following code in the action:

HttpContext.Response.Cache.SetCacheability(HttpCacheability.NoCache);

A more elegant solution is to place this into a attribute you can decorate the action with, as detailed in the top answer for this question.

Community
  • 1
  • 1
Rory McCrossan
  • 331,213
  • 40
  • 305
  • 339