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?
Asked
Active
Viewed 326 times
1 Answers
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