The number of images on the site causes a long download time

My site sometimes loads a little slower due to image loading. I actually have 61 images on my homepage because of all the overlays and png icons. I reviewed the use of sprites or image maps, but I really don't want to. I know that there can only be 2 requests to my server, so if I post the images elsewhere, this will speed up the time, but is it reliable? Pingdom tools said my site has timed out. I am looking for a solution that will either:

A) Distribute my images on different servers (but the downfall is that I want it on a reliable server (mine!)

B) Using only a few image sprites or other css techniques

C) Any ideas?

Thanks in advance.

Update 1: I created 6 subdomains and shared all my images among these subdomains. You can see a regular site with all the images located in one folder here , and you can see the same site with images through 6 subdomains here . ** As you can see, a site with images through subdomains loads WAYY more slowly. Why is this? I do not understand!

Update 2: I called my hosting company, and they seem to think that solving the subdomain will not solve the problem and will only slow it down, because each subdomain does not have unique IP addresses. My server was under heavy load, so it explains some delay, but the problem with this image still remains. He said that it’s best to use Amazon Service, so now I'm going to research.

I still have a problem with understanding - it is lagging behind certain image files. If you look at the result of loading a page in firebug (see BalusC's answer below), there is a significant latency for loading certain images. I wonder why.

+6
source share
5 answers

One of the best articles I've read on this subject:

Page load time optimization

You may not want to do sprites (I can tell), but in the end, this may be the best you can do. Distributing requests across (sub) domains is good, but each request is expensive (download speed is often a limiting factor for cable modem connections), and given that most users of most sites have experience with an empty cache, you really want to minimize the number of requests made.

I have not seen your site, but if you could reduce the number of requests in half using sprites, I assume that this will give you better performance on different platforms than any CDN trick or subdomain. (See the article for some numbers and graphs.)

+3
source share

you must use several subdomains, since each subdomain is considered as a separate domain, so other requests are possible at the same time.

Subdomains

may have (physical) symbolic links to the same catalog images /

+2
source share

Amazon offers CDN services: http://aws.amazon.com/cloudfront/ You can post images there and pay only for bandwidth used. Amazon AWS is traditionally reliable enough. You could cname additional subdomains to get around the HTTP 1.1 2 restriction, as @dusoft mentions.

+2
source share

According to your update:

I created 6 subdomains and divided all my images among these subdomains. You can see a regular site with all the images placed in one folder here, and you can see the same site with images through 6 subdomains here.

As you can see, a site with images through subdomains loads WAYY more slowly. Why is this? I do not understand!

I checked Firebug :

This was a “regular” site:

alt text
( full image here )

It was an "improved" site:

alt text
( full image here )

This is noticeably better (much more simultaneous requests), but there were a lot of big green bars to “connect” (about 9 seconds), the browser is waiting for a connection to the server. So the problem is more in the server. There seems to be something wrong with Keep-Alive , and that the Apache HTTP server is configured using KeepAliveTimeout 10 or so. Try disabling Keep-Alive for these virtual hosts on KeepAlive off and see what happens.

+2
source share

Google has a tool called Page Speed . From their description:

Page Speed ​​performs several tests on the site’s web server and front-end code. These tests are based on a set of best practices known to improve web page performance.

Page Speed ​​evaluates each page and gives recommendations on how to improve their performance. Not sure if this tool will help solve your problem regarding long wait times, but it might be worth a try.

They also have docs regarding best performance practices, such as minimizing round trip times.

0
source share

All Articles