MVC return button does not execute controller method in IE9

I have a very simple ASP.Net MVC3 application that performs an action on an index page that retrieves data from a database and displays a list of items. When I click ActionLink for one of these elements to go to the details page, and then click the back button (or click back), it will return me to the index page, but none of the data exists. Setting a breakpoint in the controller action method shows me that the breakpoint does not hit. If I press F5, then it will hit the controller and method.

This does not happen in Chrome or the latest version of FireFox, everything works as expected. This seems to be an IE issue.

Any ideas?

Thanks!

+6
source share
1 answer

This may be due to the fact that the action is cached, although I would still expect the page to show the original values.

Try this . I prefer to create an attribute and decorate actions with [NoCache].

+1
source

Source: https://habr.com/ru/post/894328/


All Articles