iOS网页错误通过蜂窝数据但不通过Wifi?最近对AT& T Cellular网络的改变? [英] iOS Web page errors over Cellular Data but not over Wifi? Recent change to AT&T Cellular network?

查看:120
本文介绍了iOS网页错误通过蜂窝数据但不通过Wifi?最近对AT& T Cellular网络的改变?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我遇到某些iOS网页(在移动版Safari,Chrome以及应用中的iOS网页中)的问题,而不是网络数据与Wifi,

I'm encountering an issue with certain iOS web pages (in both mobile Safari, Chrome, and in also iOS Webviews in app) over cellular data vs. Wifi,

该问题与此前其他人发布的问题相同:

The issue is identical to what was previously posted by someone else here:

仅限Mobile Mobile Cellular加载错误

很遗憾没有答案发布到上述网址。

Unfortunately no answers yet posted to the above URL.

基本上,我一直在HTML中看到无关的随机垃圾字符,这些字符来自蜂窝数据,但同样的页面加载完全可以通过Wifi。这不是下载速度或连接问题,它似乎是蜂窝网络上一些无法解释的数据传输/解释故障。我已经能够在不同的位置和不同的设备上复制相同的问题。

Basically, I'm consistently seeing extraneous random garbage characters in the HTML that comes down from cellular data, but the same page loading perfectly okay via Wifi. This isn't a download speed or poor connection issue, it seems to be some inexplicable data transfer/interpretation malfunction over the cellular network. I've been able to replicate the same problem at different locations and with different devices.

一个加载Wifi但加载错误的页面示例(JavaScript和由于上述无关的垃圾字符而导致的CSS错误数据在这里:

An example of a page that loads okay with Wifi but loads with errors (JavaScript and CSS errors because of the aforementioned extraneous garbage characters) over data is here:

http://www.ear-say.com

还有其他人遇到过同样的问题吗?非常感谢任何见解。

Has anyone else encountered the same issue? Any insights greatly appreciated.

推荐答案

内容类型不是问题,但这让我更多地思考页面可能在我的服务器,网络和最终客户端之间进行了转换。

The content-type wasn't the issue, but that got me thinking more about how the pages were possibly being transformed between my server, the network, and ultimately the client.

经过一些试验和错误后我删除了JQuery引用,之后页面正确加载到AT& ; T celullar数据。这导致了另一个Google搜索,并最终根据以下网址找到问题的答案:

After some trial and error I eliminated JQuery references, after which the pages then loaded correctly over AT&T celullar data. That led to another Google search, and ultimately the answer to the problem as per the below URLs:

http://bugs.jquery.com/ticket/8917

...上面的JQuery bug报告这两个URL的引用修复,其中一个实际上来自stackoverflow:

... The above JQuery bug report referenced fixes at these two URLs, one of which was actually from stackoverflow:

http://mobiforge.com/design-development/setting-http-headers-advise-transcoding-proxies

网站在3G / iPhone下的iPad上显示JavaScript错误但不在WiFi下

总之,问题在于最近的变化是AT& T蜂窝数据网络,类似于上述URL中描述的网络。即AT& T以某种方式修改某些网页内容,然后再将其发送到iPhone和iPad。修复很简单,只需为不希望由AT& T网络更改/转换的页面设置Cache-Controlno-transform标题。

In summary, the issue is with a recent change at the AT&T cellular data network, similar to that described in the above URLs. i.e. AT&T is in some way modifying certain web content before sending it on to iPhones and iPads. The fix is simple, just set the Cache-Control "no-transform" header for pages you don't want changed/transformed by the AT&T network.

I通过以下方式在PHP中为选择页面手动设置标题:

I'm manually setting the header in PHP for select pages via:

header(Cache-Control:no-transform);

header("Cache-Control: no-transform");

....但我认为它可以在目录的.htaccess文件中全局设置,或者在虚拟主机文件中的域或httpd.conf文件中的整个服务器中设置,例如:

.... but I assume it could be globally set in a directory's .htaccess file, or for the domain in the virtual host file or the entire server in the httpd.conf file, e.g.:


标头集缓存控制无变换

Header set Cache-Control "no-transform"

我不知道设置无变换将如何影响性能,我远不是Apache配置设置或网络的专家,但上面至少现在解决了最初的问题。

I don't know how setting "no-transform" will effect performance, I'm far from an expert on Apache configuration settings or networks, but the above has at least for now solved the initial problem.

这篇关于iOS网页错误通过蜂窝数据但不通过Wifi?最近对AT& T Cellular网络的改变?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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