Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Slow webapp load time in Safari iOS 9.1

Tags:

ios

safari

ipad

Our webapp takes approximately 30 seconds to load for the first time in Safari on iOS 9.1. Most of the visual loading happens in a timely manner, but HTTP requests cannot be handled for about 30 seconds. I have only been able to reproduce this on an iPad by going to the following link: http://tco.ekotrope.com/tco/?deployment=eko-dev&#community/default. And I can only reproduce it once, due to caching. It can be reproduced another time by going to the following link, http://tco.ekotrope.com/tco/?deployment=eko-dev&#community/sunwood-bridgewater.

I have tried investigating looking at the Developer Tools Network Tab while the iPad is plugged into a Macbook, but for some odd reason, the page loads quickly when it's plugged in and I'm looking at the Network Tab.

Any ideas what could be going on or what I could do for further investigation? Thanks!

like image 807
nick.sisler Avatar asked Oct 28 '15 13:10

nick.sisler


1 Answers

We were able to resolve the problem on our webapp.

In a nutshell, the problem is with how iOS 9.1 Safari chooses to schedule HTTP connections. For reasons probably related to increasing performance in certain cases has caused certain edge-cases to become problematic. In our case we had several images trying to load at the same time as we needed an XHR to occur. In other browsers like desktop Chrome this was not an issue, but iOS 9.1 Safari chokes when it tries to do all of that at once. Our solution was to have the images that trigger the problem load one after the other rather than all at the same time. This spread things out enough that things operated smoothly.

like image 76
nick.sisler Avatar answered Sep 21 '22 02:09

nick.sisler