如何在不使用document.referrer的情况下将父级URL获取在JS中
我需要使用JS重定向到当前页面的父级URL,我可以找到文档。省略了,或者具有意外的格式。
我问,还有其他方法可以实现这一目标吗?谢谢!
I need to get the parent url which redirect to current page using JS, I find document.referrer can achieve, but our company has some security rules said can't trust that the referrer header is safe - it can be spoofed, omitted, or have an unexpected format.
I am asking are there any other way to achieve this? Thanks!
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
我知道的另一种方式是看窗口对象
The other way I know of is looking into the window object