force reload browser next or back

- Posted in JavaScript by
window.addEventListener( "pageshow", function ( event ) {
        var historyTraversal = event.persisted || 
        ( typeof window.performance != "undefined" && 
            window.performance.navigation.type === 2 );
        if ( historyTraversal ) {
            window.location.reload(true);
        }
    });

_https://stackoverflow.com/questions/43043113/how-to-force-reloading-a-page-when-using-browser-back-button