Introduction
Today, I am explaining very important part of MVC application, just explaining about how to disable automatic caching in ASP.Net MVC application. It is very important in our MVC app while we don't allow end user to navigate browser cache (next, previous button etc.). MVC has provided feature to disable caching in ASP.Net MVC application.Click to go back, hold to see history
Here you can see Chrome browser previous button is allowing to click to go back, hold to see history, now I clicked on this specific previous navigation button.
Now, you will see results as below that it requires from us to Confirm Form Resubmission
Disable Automatic Caching Code Snippet
[OutputCache(NoStore = true, Duration = 0, VaryByParam = "*")] public ActionResult Start_My_Test() { // do something here return View(); }
Summary
Above, I have explained in full depth how we can disable automatic caching in ASP.Net MVC application. So it plays very vital role to make our application robust, secure and real time.
Post A Comment:
0 comments: