WebPagetest Forums
Images loading in slowly on new server - Printable Version

+- WebPagetest Forums (https://www.webpagetest.org/forums)
+-- Forum: Web Performance (/forumdisplay.php?fid=3)
+--- Forum: Discuss Test Results (/forumdisplay.php?fid=4)
+--- Thread: Images loading in slowly on new server (/showthread.php?tid=15934)



Images loading in slowly on new server - Rinsler - 11-04-2019 09:09 AM

Hi, I have just migrated my website to a new Windows Server 2016 and the images, although they're now being loaded in via http/2, are taking an age to come in. It seems like they are requested at the same time, but can't begin to load in until the last image has been rendered:

https://www.webpagetest.org/result/191103_NJ_85764334b9e5e80a6f817955eb594adb/1/details/#waterfall_view_step1

Also, some SVGs take over 10 seconds to come back. This is only apparent on this new server.

Thanks in advance

Ben


RE: Images loading in slowly on new server - andydavies - 11-07-2019 09:27 PM

What you might be seeing is typical HTTP/2 behaviour

Under HTTP/1.1 the browser prioritises the requests - each TCP connection can only be used to one request/response at a time, so once all six connections are in the use the remaining requests queue until there's unavailable connection

Under HTTP/2 only one connection is used to the main origin, and the responses are multiplexed over it - the browser can send multiple requests at a time (with a priority attached), and then the server fulfils then. This means some requests will queue on the server while higher priority requests are served and this is probably what you're seeing in the long request bars.

If you want to compare the difference test in Chrome, and then create a comparison run with the --disable-http2 command line flag

HTTP/2 works best when the content comes over as few as connections as possible so self-hosting jquery etc should bring benefits


RE: Images loading in slowly on new server - Rinsler - 11-07-2019 09:31 PM

Hi Andy

Thank you so much for the simple and easy to understand explanation of what is going on. I will certainly do the test you have suggested and report back.

Thanks!

Ben