window.location.href breaks back button code example
Example: window.location.href breaks back button
// Fixes back button issue when using history.pushState();
window.onpopstate = e => {
window.location = location.href;
};
// Fixes back button issue when using history.pushState();
window.onpopstate = e => {
window.location = location.href;
};