诺基亚 HTTP_REFERER 问题
我们使用 CodeIgniter PHP 框架开发移动应用程序。 应用程序在多个硬件手机和模拟器上进行了测试。 除了诺基亚 S40 内置浏览器外,所有地方都运行良好。 当通过那个浏览器浏览时,它显示 $_SERVER['HTTP_REFERER'] 根本没有设置 - 即使使用没有框架的直接 PHP。 具体来说,应用程序在诺基亚 3500 Classic 和 6300 上进行了测试。 此外,当在同一部手机上使用 Opera Mini 时,一切都非常顺利。 服务器是Apache2和PHP5,CodeIgniter 1.7,但我不认为这是一个框架问题。
奇怪的是,这个问题似乎世界上只有少数人得到或提到过,却没有任何答案。 好吧,问题是——我们错过了什么吗? 诺基亚 S40 内置浏览器是否真的删除了 HTTP_REFERER,还是服务器问题? 可以采取什么措施来修复或减轻它?
We've developing mobile application using CodeIgniter PHP framework. App was tested on several hardware phones and emulators. Everything works fine everywhere - except Nokia S40 built-in browser.
When browsing via thatbrowser, it reveals that $_SERVER['HTTP_REFERER'] is not set at all - even using straight PHP with no frameworks.
Specifically, app was tested on Nokia 3500 Classic and 6300.
Also, when using Opera Mini on the same phones, all worked like a charm.
Server is Apache2 with PHP5, CodeIgniter 1.7, but I don't think it's a framework issue.
Strange thing is, it seems that only a few people in the world got, or mentioned, this issue, with no answer.
Well, the question is - do we missing something? Does Nokia S40 built-in browser really strips out HTTP_REFERER, or is it server issue? What could be done to fix or mitigate it?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
任何浏览器都不需要发送引荐来源网址。 不要构建任何假设您将从浏览器获取它们的东西; 还有其他东西可以阻止它们的出现(浏览器插件、安全软件等)
Referers are not required to be sent by any browser. Do not build anything assuming you will be getting them from a browser; there are other things that can block their appearance (browser plugins, security software, etc.)
为了使 HTTP_REFERER 存在,需要有一个
HTTP_REFERER 标头。 如果有人输入,则此标头不存在
直接 URL(即:不遵循页面链接)。 它只是
当有人点击另一个页面的链接时就存在。 还有一些
浏览器不发送它们。
In order for HTTP_REFERER to exist, there needs to be a
HTTP_REFERER header. This header does not exist if someone types in
the URL directly (ie: does not follow a link to the page). It only
exists when someone clicks on a link from another page. And, some
browsers don't send them.
是的,HTTP_REFERER 是可选 http 标头。 某些运营商或其转码器(代理)正在删除 HTTP_REFERER 标头。
Yes, HTTP_REFERER are optional http headers. Some carrier, or his transcoders (proxies), are deleting HTTP_REFERER header.