0

I want to learn how to detect if I was redirected to a page after backspace button clicked in a browser. Is it possible to catch this state in jQuery?

IAmInPLS
  • 4,051
  • 4
  • 24
  • 57
mustafaalkan64
  • 207
  • 1
  • 3
  • 13

1 Answers1

0

Thank your for your reply. My main purpose was disable to call page from cache after backspace button clicked. I solved it with below script:

<script>
if (window.history && window.history.pushState) {
            window.history.pushState(null, null, window.location.pathname + window.location.search);
            $(window).on('popstate', function () {

                window.location = document.referrer;   
            });
        }
</script>
mustafaalkan64
  • 207
  • 1
  • 3
  • 13