I\'m running into a problem that\'s actually a \"feature\" on Chrome. As most of you might know, Chrome remembers a scroll position that it returns to, whenever you come bac
Here is a clean way of getting this done.
window.addEventListener('unload', function(e){
document.body.style.display = 'none';
});
By simply setting the body display to 'none' you don't have to worry about a flash of the browser scrolling to the top of the page before it is unloaded and the scroll position will automatically be reset to 0.