Can `window.history.replaceState()` be used to create a POST request on reload?

Viewed 18

Using

if (window.history.replaceState) 
    window.history.replaceState(null, null, window.location.href);

is a popular choice (e.g. by WordPress) to avoid resubmitting forms on page reload without using the post-redirect-get idiom.

Now, I am wondering: Is it possible to use window.history.replaceState() to place a state that would actually cause a POST instead of GET request to be done on page reload? I know, it would cause the browser to prompt the user to confirm resubmission but I am still curious whether the browser API allows to replace a POST state with a POST state with modified data.

0 Answers
Related