Andrew
Andrew

Reputation: 421

images not loading right away

I have a site using some ajax here: http://deezteez.com/

If you sort by "Newest" (top right drop down box) you will notice that the new images (of products that just got added recently) will take about 30 seconds to actually load in, even though the page is done loading. older images don't do this, even if I start with a clear cache.

Anyone have an idea of what would be causing this?

Upvotes: 2

Views: 197

Answers (1)

Alex Wayne
Alex Wayne

Reputation: 187272

Chrome's console seems to show that your server is simply slow. The graph below is how your images load in. The light colored bar is when the image is requested. The dark colored bar is the image actually being downloaded.

And you can see they all get requested at the same time. But then it takes a while for the server to respond to those requests. Once the server responds, things seem to download quickly, but that response seems quite lagged.

enter image description here

What is going on behind the scenes on your server, I have no idea. But some suggestions:

  • Drastically lower product count per page, so that far less images are requested at once.
  • Use CDN services to speed up static asset delivery and even provide geographically local image download servers.
  • If you have image data being generated on the fly or pulled form the database on each request, DO NOT DO THAT. Or if you need to do that, use server side caching to prevent doing it over and over again.

Upvotes: 4

Related Questions