[removed] detect when page has been navigated “back” to

后端 未结 2 1978
忘掉有多难
忘掉有多难 2021-01-18 07:19

Suppose I have a page open in a browser and I go to my address bar and enter another page. Then I hit the back button to go to my original page. I\'d like to write some Java

2条回答
  •  执笔经年
    2021-01-18 07:46

    You should try to give the user a cookie on both pages, the navigated to page and the page itself, with dates and times and compare see if they're close, or if they show that he's been on one page, been on another, and then redirected.

    Another option is to give the user a cookie when he is redirected

提交回复
热议问题