Jump to content

Photo site loading time issue


son

Recommended Posts

On a photo gallery site the photos we have issues as it simply takes too long. I am not sure if the issues is too large image size, the Javascript is causing it or the server is too slow (or whatever else the reason might be). What is a sensible way to go along testing and find the "real" cause? Thanks,Son

Link to comment
Share on other sites

I had a look in Firefoxes web and error console and it shows on page load:[09:24:37.601] GET http://www.domain.com/ [HTTP/1.1 200 OK 188ms][09:24:37.856] GET http://www.domain.com/img/small/info.php?id=1 [HTTP/1.1 200 OK 124ms] (file that brings in the images for gallery) Then clicking to next photo (on load of website the first image of default photo cat shows immediately)[09:30:07.048] GET http://www.domain.co.uk/img/main/holiday.jpg [HTTP/1.1 200 OK 1139ms]Going to server and checking the sizefor photo, the photo is 366KB (710px/493px)Checking a quicker one ([09:30:19.572] GET http://www.domain.co.uk/img/main/road.jpg [HTTP/1.1 200 OK 250ms]) the size is 66KB (720px/512px) What is normally expected for loading time? What setting should the image being saved before using the web admin upload facility and/or is there a way to downsize automatically with my photo upload script? Currently I check for dimensions and resize if too wide or high... Son

Link to comment
Share on other sites

The whole page should load in under 5sec, when dealing with gallery images, it is best to use a small thumbnail of the original, and preload the original in the background after the page loads, in a typical gallery, when the thumbnail is clicked, or in some cases hovered over the large original file should open/appear instantly.

Link to comment
Share on other sites

If you need to optimize the images a tool like Photoshop will let you see several different quality versions so that you can find the right balance between quality and size for each image. You can resize things with PHP, but you can't really optimize as effectively. You can save everything as JPG images with a high compression, but you wouldn't be able to tweak each image individually.

The whole page should load in under 5sec
That's a little subjective, the load time depends on how much content there is on the page and it's up to the designer to find the right balance of quality vs. size.
Link to comment
Share on other sites

The load time depends on how much content there is on the page
well dah! I have been told numerous times by SEO company who monitor visits to the site, that pages should take no longer than 5 sec, as users can be very impatient, and any longer they will have a tendency to go somewhere else.
Link to comment
Share on other sites

I have been told numerous times by SEO company who monitor visits to the site, that pages should take no longer than 5 sec, as users can be very impatient, and any longer they will have a tendency to go somewhere else.
It's a good guideline to keep the page size down, but trying to target a specific number of seconds isn't really feasible. You can't control the user's connection speed, for example. What takes 1 second for one person may take 10 for another, but that doesn't necessarily mean the page is too large.
Link to comment
Share on other sites

Thanks guys. Your inputs really gave me some good pointers... However, if we even assumed the 5 sec rule was true, then the images would all be well within this and the page would load quick. But this is not the case. I tested on different machines with different internet providers and it takes ages for the 1139ms image for example to load... Son

Link to comment
Share on other sites

If it takes the image 1 second to download but longer to display then there might be some Javascript that is slowing things down or something else. It's hard to guess what the problem might be. In addition to seeing the timing for each resource that is downloaded, you can also use the developer tools to profile the Javascript and figure out what part of the code is taking the longest.

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...