Created
June 25, 2019 13:03
-
-
Save antonxo/606a47f66c0ab2f15ecfe945e5ff66c1 to your computer and use it in GitHub Desktop.
Post/Redirect/Get alternative with JS, clear POST data after refresh/back to avoid form resubmission.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//insert in your html with POST form | |
<script> | |
if (window.history.replaceState) { | |
window.history.replaceState(null, null, window.location.href); | |
} | |
</script> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment