× {{alert.msg}} Never ask again
Get notified about new tutorials RECEIVE NEW TUTORIALS

Be optimal when loading data from remote sites...

Nathan Bruer
Nov 11, 2015
<p>As browsers get more and more standardized with javascript, html and css handling they are doing the opposite when it comes to how they get to those results. One of the side affects of this is how keep-alive and resource limits are delt with on different browsers. Keep-alive connections are usefull because they do not require the browser and the server to setup a socket to use over and over again, instead it uses a small pool of connections but keeps them open for a set duration allowing the browser to reuse that connection for another request. This is very optimal, but can cause some strange side affects. In this particular case a bug was found only in IOS 9.1. Although this was not the application developer's fault, a work around had to be made but was very difficult to diagnose and find.</p> <p>We had a lot of trouble finding where the problem was steming from because only on the first load would it take a very long time for a request to be made. This was because the event to trigger Safari in IOS 9.1 to do the request when the pool was overfull would not execute until the connection was closed. If some of the images or resources on the page were cached it would not cause a problem, but if the browser did not have a cache it would cause a problem.</p> <p>This could have been avoided by "Spriting" the images together, making fewer requests, or sending the requests in sequential order instead of all at once.</p>
comments powered by Disqus