我不太肯定timeout的作用。但是从它的解释来看,它是指指的是“10秒之内如果没发出请求就放弃”,而不是“10秒之内如果没收到返回数据就放弃”:timeoutSet a timeout (in milliseconds) for the request. This will override any global timeout set with $.ajaxSetup(). The timeout period starts at the point the $.ajax call is made; if several other requests are in progress and the browser has no connections available, it is possible for a request to time out before it can be sent. In jQuery 1.4.x and below, the XMLHttpRequest object will be in an invalid state if the request times out; accessing any object members may throw an exception. In Firefox 3.0+ only, script and JSONP requests cannot be cancelled by a timeout; the script will run even if it arrives after the timeout period.而事实上,如果把timeout改成“timeout: 20000,”,在Safari中仍然得不到正常结果。而改成“timeout: 5000,”,在其他浏览器中也不影响结果。所以Sarafi的问题还是存在,貌似无关timeout的值。
解决方案 »
免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货