Iphone 3g browser rendering problems. Wifi is fine

拥有回忆 提交于 2019-12-05 21:03:43

Your 3g Network Provider may insert a Proxy to serve webpages, e.g. for downsizing images. Also it might inject some JavaScript into the page. Such things could be the source of your issues. Some iPhone browsers let you view the source of a webpage, e.g. iCab mobile, so you could doublecheck what is delivered to the browser from your network provider.

Just a guess...

After some investigation, it seems the solution to the probelm was not to use import when using external CSS files references, 3g doesn't like it for some service providers.

Tom

I ran into this a while back, it was caused by css and javascript compression done by O2, I found the solution was to add a HTTP Header "Cache-Control: no-transform" response directive to these files.

See: http://stuartroebuck.blogspot.co.uk/2010/08/official-way-to-bypassing-data.html

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

For anyone needing a solution to this in ASP.NET, this sets the Cache-Control header as per for javascript files using URL Rewrite Module 2.0 http://learn.iis.net/page.aspx/665/url-rewrite-module-20-configuration-reference.

<system.webServer>
        <rewrite>
            <outboundRules>
                <rule name="Compression header" preCondition="Match JS Files">
                    <match serverVariable="RESPONSE_Cache-Control" pattern="(.*)" />
                    <action type="Rewrite" value="no-transform" />
                </rule>
                <preConditions>
                    <preCondition name="Match JS Files">
                        <add input="{RESPONSE_CONTENT_TYPE}" pattern="(javascript)$" />
                    </preCondition>
                </preConditions>
            </outboundRules>
        </rewrite>
标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!