jQuery移动页面无法在荷兰3G连接上正确加载

问题描述:

我有一个jquery-mobile应用程序,该应用程序正在iphone应用程序的UIWebView内运行. webview正确显示了jquery-mobile页面,但仅在该页面未加载3G连接时显示.我知道这听起来很奇怪,而且确实是一个很奇怪的问题,因为如果该页面加载了WIFI连接,则显示效果非常好...这是屏幕截图...

I have a jquery-mobile application that is running inside a UIWebView in an iphone application. The webview shows the jquery-mobile page correctly, BUT only when the page is not loaded with a 3G connection. I know this sounds very weird and it is a very weird problem indeed, because if the page is loaded with a WIFI connection, it is display perfectly... here is a screenshot...

如果我的客户使用3G连接加载jquery移动页面,则由于某种原因,似乎未加载显示jquery移动页面所需的javascript和CSS.这是第二张屏幕截图,显示了该页面加载3G时的外观.

If instead my client uses a 3G connection to load the jquery mobile page, it seems that for some reason the javascripts and CSS that are needed to display the jquery mobile page are not loaded. Here is a second screenshot showing what the page looks like when it is loaded with 3G...

(注意:我知道此屏幕截图与第一个屏幕并不完全相同,但是在正确加载时,其样式与第一个屏幕截图相同)

(Note: I know that this screenshot is not exactly the same page as the first one, but when it loads correctly it has the same styling as the first screenshot)

从页面标题中可以看到,出现此问题的3G连接在荷兰,我的客户在荷兰尝试了两个不同的3G提供商,并且两个提供商都遇到相同的问题.如果我在自己居住的地方(即南非)测试该应用程序,则该页面将通过3G连接正确加载.

As you can see from the title of the page, the 3G connection that is giving this problem is in the Netherlands and my client has tried two different 3G providers in the Netherlands and encounters the same problem with both providers. If I test the application where I live, namely in South Africa, the page loads correctly with my 3G connection.

所以,我的问题是,没有人知道是什么原因导致jquery移动javascript和CSS无法在荷兰的3G连接上加载吗?

So, my question is, does anyone have any idea what could be causing the jquery mobile javascripts and CSS to fail to load on 3G connections in the Netherlands?

我已经确定荷兰的3G连接出了什么问题.出现此问题的原因是,几个移动运营商在将内容交付到手机之前进行了内容修改,并且这种修改破坏了jQuery.根据我的经验以及从互联网上阅读的内容来看,似乎以下提供商在进行内容修改:英国的O2,荷兰的Vodafone和荷兰的T-Mobile.

I have determined what was going wrong on the 3G connection in Holland. This problem arises because several mobile operators do content modification before delivering it to the phone and this modification breaks jQuery. From my experience and from what I have read on the internet, it seems that the following providers do content modification: O2 in UK, Vodafone in the Netherlands and T-Mobile in the Netherlands.

要查看有关这些3G连接中断javascript遇到问题的其他人的报告,请查看以下链接:

To see reports of other people who have been encountering issues with these 3G connections breaking javascripts look at the following links:

http://stuartroebuck.blogspot.com/2010/07/mobile-proxy-cache-content-modification.html

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

http://www.ladysign-apps.com/blog/code/javascript/jquery-does-not-load-3g-iphone-safari/

上面列出的最后一个链接也可以解决此问题; 3G连接正在修改和破坏的javascript文件必须移至外部服务器.因此,例如,如果jQuery被3G连接打断(对我而言就是这种情况),则不要自己提供jquery文件,而要使用Google之类的CDN: http://ajax.googleapis.com/ajax/libs /jquery/1.6.2/jquery.min.js

The last link listed above also gives the work around to this problem; the javascript file that is being being modified and broken by the 3G connection must be moved to an external server. So, for example, if jQuery is being broken by the 3G connection (as was the case for me), then don't serve the jquery file yourself, instead make use of a CDN like google: http://ajax.googleapis.com/ajax/libs/jquery/1.6.2/jquery.min.js

希望此信息可以节省其他人因此问题而使我沮丧的时间!

Hope this information saves someone else the hours of frustration that this issue has cost me!