Skip to content

Instantly share code, notes, and snippets.

@JonAbrams
Created June 1, 2012 21:43
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save JonAbrams/2855320 to your computer and use it in GitHub Desktop.
Save JonAbrams/2855320 to your computer and use it in GitHub Desktop.
if (typeof history.pushState === "undefined") {
// Refresh the page to the new URL if pushState not supported
location.href = new_path
}
history.pushState({
old_text: old_text.val(),
new_text: new_text.val(),
slug: new_path
}, null, new_path);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment