Post / Redirect / Get in Webkit causes a full page reload

It seems that in Webkit-based browsers (Chrome and Safari), when Post / Redirect / Get is running on the server, the whole page is fully loaded (html + images + css, etc.). It looks the same as if you reloaded the page.

A question was asked in the Google Chrome Help (and something like a solution): http://www.google.com/support/forum/p/Chrome/thread?tid=72bf3773f7e66d68&hl=en

Does anyone have a more elegant way to do this? I work with ASP.NET MVC and would prefer not to write a custom redirect result that returns Javascript or the actual UserAgent based page.

Should I just hope and wait for Webkit to change its behavior?

+3
source share
2 answers

This is mistake. The only workaround I've seen so far is to use the Refresh header instead of the Location header for redirection. This is far from ideal.

Error 38690 - Sending a POST that leads to server redirection causes all cached items to reload

Also, this question is a duplicate of " Loading a full page in Post / Redirect / Get ignoring cache control ".

+2
source

Try setting the title Cache-Control: public.

0
source

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


All Articles