Perhaps the chronology error is PRG execution, and if you switch to the same form again, the history record is not added

There is a weird back button behavior that happens only in Chrome.
I have two pages - Grid and Form
scenario:
1. When switching from a grid to a form, everything is in order - the grid is added to the story.
2. When the form is sent to the server by mail, I use RedirectToAction to redirect (302) to the grid again - the form is added to the history.
3. When switching from the grid to the form again after redirection, the history point containing the grid address is not added to the history

Now you need to double-click the "Back" button to return to the grid.

if you repeat all the steps several times and observe the history stack, you will see a sad list of form records with no grid in the middle.

edit : here is a link to a page showing the problem, open it in chrome and follow the instructions - see Chrome history error in action

The only “solution” I found for this is to put some random shit in the form link, but I really hate it.

+7
source share
1 answer

Chrome strictly adheres to HTTP 303 See others , while your application uses 302 Found to redirect. See the corresponding chrome error report here: http://code.google.com/p/chromium/issues/detail?id=2801

You can vote to fix ASP.Net MVC RedirectToAction here: http://connect.microsoft.com/VisualStudio/feedback/details/706961/asp-net-mvc-controller-redirecttoaction-method-should-return-http-303 -response

+3
source

All Articles