17

I have a site that is using HTTP/2, and the site is slow to load images. Looking at Chrome's Devtools, most of the time is spent in "queueing" the network requests for the images. My understanding is that with HTTP/2, multiple requests may be made simultaneously over the same TCP connection, but I am seeing that Chrome is only issuing 6 requests simultaneously and queueing the rest (as if it were using HTTP/1.1). I know that it is using HTTP/2 since the "protocol" column in the "Network" tab says "h2".

Why is Chrome queueing up these requests instead of sending them in parallel?

enter image description here

tez
  • 574
  • 6
  • 13
  • 2
    Servers may not appreciate receiving a bajillion image requests all at once. – user2357112 Jul 25 '17 at 23:58
  • Also, making a bajillion image requests in parallel isn't guaranteed to make things any faster, and it could even increase perceived or actual loading times. – user2357112 Jul 26 '17 at 00:00
  • 2
    This is just around 20 image requests; doesn't seem like very much to me. Besides, whether or not it's better to issue the requests in parallel is secondary; I can't measure whether parallel is better or not anyway, since the requests are not being made in parallel. One of the big benefits of HTTP/2 is multiplexing many requests over a single TCP connection, and that doesn't seem to be happening here. – tez Jul 26 '17 at 10:16
  • what's the server url? – laike9m Jul 27 '17 at 09:32
  • @laike9m the server URL is https://umoda.io/shop. – tez Jul 31 '17 at 23:05
  • Sorry for the late response – how are you requesting the images? If they're fetched via JavaScript, Chrome maybe isn't able to parallelize the requests. – Konstantin Möllers Mar 25 '19 at 09:33
  • @tez Did you ever figure out the root cause? I have a similar issue on http2 and can't figure out the queueing cause as well. – GaussZ Sep 14 '20 at 07:49
  • @tez are you sure that everything is OK from server side? I mean parallel requests limit, etc. Also this answer might be helpful for you: https://stackoverflow.com/a/53526197/973254 –  May 02 '22 at 08:25
  • I can see only 5 images being queued at the same time. Once one of them has completed, a new one is queued and so on. No issue – Nikolay Dimitrov Feb 24 '23 at 03:08

0 Answers0