0

How to keep page position when pressed refresh button/code?

<script type="text/javascript">
jQuery(document).ready(function($) {
    $("#content").append('<div class="right"><div class="refreshup"><img src="/images/refresh.png" title="Page refresh" alt="Page refresh" /></div></div>');
    $(window).scroll(function() {
        if ($(this).scrollTop() > 100) {
            $(".refreshup").fadeIn()
        } else {
            $(".refreshup").fadeOut()
        }
    });
    $('.refreshup').click(function() {
        location.reload(true);
        return false;
    });
});
</script>

And refresh without clear/empty cache & cookies?

Erekle M.
  • 105
  • 8
  • Possible duplicate of [Refresh Page and Keep Scroll Position](https://stackoverflow.com/questions/17642872/refresh-page-and-keep-scroll-position) – Nylock Feb 12 '19 at 09:46
  • No, this not help me. Solved with this thread: https://www.redips.net/javascript/maintain-scroll-position/ – Erekle M. Feb 15 '19 at 09:13

0 Answers0