Browser cache issue mvc

Browser cache is a problem, most of the developer faced. I also faced this problem while worked on mvc project. Actually my application was working fine on the other browsers like Chrome, Firefox. But on the Internet Explorer, it was causing some issues.

In the IE my application cache the values of a bootstrap modal popup for some reason. I did research and get some ideas to fix but didn’t work much of them.

At last I got the server side code to fix this cache issue on all the browsers. As I put that code on my BaseController it works like charm

Please get below code and put specific controller which is caching for you.

 [OutputCache(NoStore = true, Duration = 0, VaryByParam = "*")]
 public class BaseController : Controller
//do what you want

Hope this will work for you guys as well.

Happy coding……

Posted by | View Post | View Group