0

I'm using AngularJS on client side and ASP .NET MVC4 as a framework. Application is hosted on IIS6. Unfortunately after each release I get feedback that some pages don't work. I turned out that AngularJS requests for views, eg.

/AppName/Home/Index

are returning 304 status code (I have no idea why...) and browser is using old template. Only hard refresh (ctrl + f5) helps.

Is there a way to configure IIS6 or ASP .NET MVC4 or change web.config in order to prevent browser from caching the views?

1 Answer 1

1

Try to mark actions for views that you dont want to cache with OutputCache attribute like this:

 [OutputCache(NoStore = true, Duration = 0, VaryByParam = "None")]

It will disable MVC lavel cache. After that browser can still keep some cache. To prevent this try to use something like this.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.