reload on history-back with "history.pushState" usage
/** | |
* reload on history-back with "history.pushState" usage | |
* | |
* Necessary hack because WebKit fires a popstate event on document load | |
* https://code.google.com/p/chromium/issues/detail?id=63040 | |
* https://bugs.webkit.org/process_bug.cgi | |
*/ | |
$(window).bind('load', function() { | |
if (Modernizr.history) { | |
setTimeout(function() { | |
$(window).bind('popstate', function() { | |
location.reload(); | |
}); | |
}, 0); | |
} | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment