iOS Web page errors over Cellular Data but not over Wifi? Recent change to AT&T Cellular network?

前端 未结 3 800
不思量自难忘°
不思量自难忘° 2020-12-07 03:55

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 iden

3条回答
  •  庸人自扰
    2020-12-07 03:57

    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.

    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

    ... 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

    Web site exhibits JavaScript error on iPad / iPhone under 3G but not under WiFi

    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'm manually setting the header in PHP for select pages via:

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

    .... 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"

    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.

提交回复
热议问题