Skip to content

Instantly share code, notes, and snippets.

@Kameshwaran
Last active January 22, 2019 10:08
Show Gist options
  • Save Kameshwaran/33b2f1bc998686705c9c29f9dac7e680 to your computer and use it in GitHub Desktop.
Save Kameshwaran/33b2f1bc998686705c9c29f9dac7e680 to your computer and use it in GitHub Desktop.
Add/Update URL param and reload page
window.updateParamAndReload = function(paramName, value) {
var url = new URL(window.location.toString())
url.searchParams.set(paramName, value)
window.location = url
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment