Skip to content

Instantly share code, notes, and snippets.

View thanhtuong's full-sized avatar

Thanh Tuong thanhtuong

  • KMS Technology
  • Viet Nam
View GitHub Profile
window.onload = function () {
if (typeof history.pushState === "function") {
history.pushState("jibberish", null, null);
window.onpopstate = function () {
history.pushState('newjibberish', null, null);
// Handle the back (or forward) buttons here
// Will NOT handle refresh, use onbeforeunload for this.
};
}
else {