Skip to content

Instantly share code, notes, and snippets.

@beatrizsmerino
Created December 26, 2019 23:38
Show Gist options
  • Save beatrizsmerino/5ee1a2e24f4c5f8c6ecd4327ef9edfc1 to your computer and use it in GitHub Desktop.
Save beatrizsmerino/5ee1a2e24f4c5f8c6ecd4327ef9edfc1 to your computer and use it in GitHub Desktop.
Clean the browser storage to delete the POST variables from the forms and prevent them from being resent when clicking on the button again.
if(window.history.replaceState){
window.history.replaceState(null, null, window.location.href);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment