Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
嗨,我的应用程序要求在单击浏览器后退按钮时重定向到指定页面。我已经搜索了多种形式,但无法获得我真正需要的内容。任何人都可以为我提供解决问题的最佳解决方案.....
您需要遵循 Post-Redirect-Get(PRG)。
您的场景:- 您正在从第 1 页 ---> 第 2 页 ---> 第 3 页导航。单击第 3 页上的返回。因此,从第 1 页导航到第 2 页时触发的任何请求都会触发 requires 。
解决方案:- 在从第 1 页导航到第 2 页时跟随 PRG。