Images loading in slowly on new server

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:

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

Thanks in advance


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

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.