Alternative to quot;Refererquot; Header(“推荐人的替代方案标题)
问题描述
我使用了代码request.getHeader("Referer");"该代码似乎工作正常.但最近我发现它在 IE 中不起作用.IE 正在抛出 null.我现在对如何前进一无所知.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.
这篇关于“推荐人"的替代方案标题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持编程学习网!
本文标题为:“推荐人"的替代方案标题


- C++ 和 Java 进程之间的共享内存 2022-01-01
- Java包名称中单词分隔符的约定是什么? 2022-01-01
- Eclipse 插件更新错误日志在哪里? 2022-01-01
- Safepoint+stats 日志,输出 JDK12 中没有 vmop 操作 2022-01-01
- 如何使用WebFilter实现授权头检查 2022-01-01
- Jersey REST 客户端:发布多部分数据 2022-01-01
- value & 是什么意思?0xff 在 Java 中做什么? 2022-01-01
- 从 finally 块返回时 Java 的奇怪行为 2022-01-01
- Spring Boot连接到使用仲裁器运行的MongoDB副本集 2022-01-01
- 将log4j 1.2配置转换为log4j 2配置 2022-01-01