XHR prevents images to be downloaded in iOS6+ Safari/UIWebView
Please give your reaction at
https://discussions.apple.com/message/20131649
.
WHAT IS HAPPENING HERE: This page demonstrates how the Safari/UIWebView browser on iOS 6 or higher is unable to download images while an XHR request is running. The script will add an image to the DOM (at t=2), then start an XHR request which will take 20 seconds to complete (t=3). While the request is running, a second image is added to the DOM (at t=7). In every browser we see that the image is downloaded and displayed immediately. In iOS 6+ Safari/UIWebView however, the image is only not downloaded until the XHR request is completed. Note: If the images where downloaded from another host/port than the XHR request, this problem does not occur. See this page source code for details on what is happening. The XHR request loads sleep.php with the following contents: