I am building a website which I am publishing with divs. When I refresh the page after it was scrolled to position X, then the page is loaded with the scroll po
div
The answer here does not works for safari, document.ready is often fired too early.
Ought to use the beforeunload event which prevent you form doing some setTimeout
beforeunload
setTimeout
$(window).on('beforeunload', function(){ $(window).scrollTop(0); });