Skip to content

Instantly share code, notes, and snippets.

@kennethkufluk
Created May 18, 2013 04:10
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save kennethkufluk/5603204 to your computer and use it in GitHub Desktop.
Save kennethkufluk/5603204 to your computer and use it in GitHub Desktop.
Example of pushState breaking Safari 6.0.4. Run this anywhere. Click the page, see the url change to "page2". Use two fingers to swipe back. Wait five seconds, and the page will fade away, because the paint server dies.
<html>
<title>Bug in Safari 6.0.4</title>
<body>
Run this anywhere. Click the page, see the url change to "page2".<br/>
Use two fingers to swipe back. Wait five seconds, and the page will fade away, because the painter dies.<br/>
Does not fail if web inspector is open.
<script>
document.body.onclick = function() {
history.pushState({}, 'title', 'page2');
};
</script>
</body>
</html>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment