There were some problems, led to scrolling "contents_container" instead of scrolling "body".
From then on, click "history.back" to forget the scroll position.
I found jquery cookie but it doesn't works.
// When document is ready...
$(document).ready(function() {
// If cookie is set, scroll to the position saved in the cookie.
if ( $.cookie("scroll") !== null ) {
$(document).scrollTop( $.cookie("scroll") );
}
// When a button is clicked...
$('#submit').on("click", function() {
// Set a cookie that holds the scroll position.
$.cookie("scroll", $(document).scrollTop() );
});
});
and this too.
if (history.scrollRestoration === 'manual') {
history.scrollRestoration = 'auto';
}
and this too.
I really want to remember the page's scroll position.
Here is my css code and could you fix the problem?
.contents_container {width: 100%; height: 100%; overflow-y: scroll; position: relative; float:left;}
Thank you.