Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to improve performance by getting multiple images in a single http request?

Tags:

css

angularjs

I am creating a website in AngularJs(1.5.5) that has a lot of images on the page. To show these images I make one http request per image. So is there a way to get all the images by making a single http request?

I am aware of css sprites and I can't use that as there are lot of images like employee images of a company and can't create sprite for these.

There is a node server running from which the images are retrieved.

like image 951
Harsh Grover Avatar asked Nov 27 '25 15:11

Harsh Grover


1 Answers

Use HTTP/2.

It will not allow you to request multiple images in a single request, but it will keep the connection open to the web server and allow multiplexing of multiple image requests.

like image 97
Martin Avatar answered Nov 30 '25 06:11

Martin



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!