0

First, see the differences between browsers below.

Two types of POST destination endpoints /register and /register-history-push-state are provided, but the essential difference is whether or not the following JavaScript is executed.

/register /register-history-push-state
enter image description here enter image description here
window.history.replaceState("", "", "/register-history-push-state");

If you reload the page after the POST transition, you will see that the HTTP Method on reload is different, as follows

Reload HTTP Method(NOT exec replaceState) Reload HTTP Method(exec replaceState)
Chrome POST GET
Firefox POST GET
Safari POST POST

The specification of url and history update steps does not clearly state here Not found.

Which pattern of behaviour is the correct browser specification?

himenon
  • 211
  • 2
  • 8
  • Related Question: https://stackoverflow.com/questions/46933389/safari-send-post-request-when-refresh-after-pushstate-replacestate – himenon Mar 30 '22 at 06:49
  • Webkit Bugzilla: https://bugs.webkit.org/show_bug.cgi?id=202963 – himenon Mar 30 '22 at 06:49

0 Answers0