“Referer”的替代方案头 [英] Alternative to "Referer" Header

查看:109
本文介绍了“Referer”的替代方案头的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我使用了代码request.getHeader(Referer);代码似乎工作正常。但最近我发现它不能在IE中运行。 IE投掷无效。我现在对如何前进感到无能为力。有没有Referer标题的替代品可以获得以前的链接并在所有浏览器中正常工作?从上一个链接设置自定义标题对我来说不是一个可行的选择。所以有人请帮我解决这个问题。
谢谢。

I have used the code "request.getHeader("Referer");" The code seemed to work fine. But recently I found out that it is not working in IE. IE was throwing null. I am now left clueless about how to go forward. Is there any alternative for "Referer" header which can get the previous link and work correctly in all the browsers? Setting a custom header from the previous link is not a viable option for me. So someone please help me out on this. Thanks.

推荐答案

Referer标头条目是可选的。你不能依赖它存在。没有跨浏览器方式来获取上一个链接,因为这取决于用户设置和代理配置(即系统管理员认为应该允许您查看的内容)。

The "Referer" header entry is optional. You cannot rely on it being present. There is no cross-browser way to get the previous link because this depends on the user settings and proxy configuration (i.e. what the system administrators think they should allow you to see).

你必须找到一种没有这些信息的生活方式。

You must find a way to live without this information.

这篇关于“Referer”的替代方案头的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆