Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
HTML5 Fake History Example
<!DOCTYPE html>
<meta http-equiv="Content-type" content="text/html; charset=utf-8">
<title>HTML5 'pushState' History Example</title>
<script type="text/javascript" charset="utf-8">
var original = document.location.href;
isFakeHistory: true,
fakeHistoryURL: "fake-history.html"
}, "Fake History", "fake-history.html");
history.pushState({}, "Original State", original);
window.onpopstate = function(event) {
document.location = event.state.fakeHistoryURL;
<p>Page 1</p>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.