jquery AJAX stopped working with iOS 5.0.1

前端 未结 3 1381
旧时难觅i
旧时难觅i 2020-12-11 08:04

The following piece of logic used to work with both jquery 1.4.4 and 1.7.1 on all mobile devices that we\'re supporting:

$.ajax({
  url: \'http://www.example         


        
3条回答
  •  轻奢々
    轻奢々 (楼主)
    2020-12-11 08:30

    The link that I provided in the question is actually pointing to the solution. Some of my ajax requests are used to fetch URL's of PDFs which are streamed using

    Content-Disposition: attachment; filename="somename.pdf"
    

    Apparently, that causes major issues in iOS 5.0's Safari, breaking the XMLHttpRequest object (it is not related with jquery). Crazy. Here's the link again:

    http://spin.atomicobject.com/2012/01/20/mobile-safari-on-ios-5-1-unexpectedly-making-cross-origin-resource-sharing-requests/

提交回复
热议问题