vendredi 1 juillet 2016

Safari on iPad: some resources not requested for 5 minutes


I have a web page that requires 9 resources to be loaded (index.html, two CSS, six JS libraries.) The total size of all files is around 500 kb.

On Safari on the iPad, if I clear the cache before I load the page, the page takes exactly 5 minutes to load. Looking at my server logs, I can see that the iPad requests 7 of the resources immediately, waits 5 minutes, then requests the final 2 resources, which are then immediately delivered. (This is happening over a local network so data transfer is fast.)

When I refresh the page, it loads immediately, since it can draw resources from the cache. (Also, if I refresh it after attempting the first load but before 5 minutes have passed, it still loads immediately, because the first 7 resources are in the cache.) But of course, I need my page to load correctly on first load. Loading the page on Chrome on my PC presents no issues under any circumstances.

This behaviour seems bizarre to me! Can anyone suggest an explanation, or a fix?


Aucun commentaire:

Enregistrer un commentaire