iPhone的cookie /缓存问题在3G,罚款通过wifi [英] iPhone cookie/caching issue on 3G, fine over wifi

查看:170
本文介绍了iPhone的cookie /缓存问题在3G,罚款通过wifi的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在使用PHP,MySQL,Cookie和HTML表单来登录用户,然后跟踪他们的会话(它是一个日历应用和留言板)的旧的移动网站时遇到问题。当我的iPhone连接到我的wifi网络在家里,一切都很好,但是当我切换到3G的cookies不再工作,会话被丢弃。

I'm having trouble with an old pre-mobile website which uses PHP, MySQL, cookies and HTML forms to log users in, and then track their session (it's a calendar app and messageboard). When my iPhone is attached to my wifi network at home, all is well, but when I switch to 3G the cookies no longer function and the session is dropped.

另一个线程:
网站展示JavaScript / iPhone下的iPad / iPhone下但不是在WiFi下
的海报在3G上遇到一个javascript问题,但没有在WiFi上的JavaScript错误,建议是蜂窝运营商(在他的情况下,O2,在我的情况下,橙UK)本身是混乱的HTTP数据穿过3G,但不是WiFi。修复是使用更多的javascript来防止包含的内联。

I read another thread: Web site exhibits JavaScript error on iPad / iPhone under 3G but not under WiFi in which the poster was experiencing a javascript issue on 3G but not on WiFi, and the suggestion was that the cellular carrier (O2 in his case, Orange UK in my case) itself was messing with the HTTP data going across 3G, but not WiFi. The fix was to use more javascript to prevent inlining of includes.

有没有人认为我的cookie和会话问题可能是由类似的问题引起的,如果没有可以想想一个替代的解释和理想的修复?

Does anyone think that my cookie and session problems are possibly caused by a similar issue, and if not can anyone think of an alternative explanation and ideally a fix?

推荐答案

我猜你的3G提供商代理你的HTTP不知何故。一些(在我看来,crappier)ISP是这样做常见的。这将解释为什么它的行为与另一个连接上的同一浏览器不同。

I'm guessing your 3G provider is proxying your HTTP somehow. It's common for some (in my opinion, crappier) ISPs to do this. That would be an explanation of why it is behaving differently to the same browser on another connection.

很多人会通过代理如Squid访问您的网站。您需要修正此问题才能正常工作,否则您可能会无意中阻止对某些人的访问。

Lots of people will access your site over a proxy such as Squid. You need to fix this so it works or you might inadvertently block access to some people.

我的猜测是,您的代码可能只是以特定方式设置Cookie由浏览器原谅,但该特定代理不支持。我将通过指定域,以不同的方式(带有点在域的开始,没有,引号围绕域/路径和没有)和打开或关闭Cookie2功能或HTTP-only功能开始故障排除。

My guess is that your code may just be setting cookies in a particular way which is forgiven by browsers but not supported by that particular proxy. I'd start troubleshooting by specifying the domain, expiry in different ways (with dot at start of domain and without, with quotes around domain/path and without) and turning on or off Cookie2 features or HTTP-only features.

iPhone浏览器有HTTP头查看器吗?如果不尝试绑定它,并在Firefox中使用类似LiveHTTPheaders(请记住,如果你的网络可以检测到绑定,它可以在理论上打开/关闭其代理基于是否绑定)。

Is there an HTTP header viewer for the iPhone browser? If not try tethering it and use something like LiveHTTPheaders in Firefox (keep in mind that if your network can detect tethering it could in theory turn on/off its proxy based on whether you tether).

您可能必须张贴您的代码或HTTP脚本(只是标题)供人们进一步诊断。

You'd probably have to post your code or an HTTP transcript (just the headers) for people to diagnose further.

这篇关于iPhone的cookie /缓存问题在3G,罚款通过wifi的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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