son Posted January 18, 2012 Share Posted January 18, 2012 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 More sharing options...
eTianbun Posted January 18, 2012 Share Posted January 18, 2012 Start by checking the size of the images? Link to comment Share on other sites More sharing options...
son Posted January 18, 2012 Author Share Posted January 18, 2012 Images have varying sizes, anything in between 39KB and 433KB at present... Son Link to comment Share on other sites More sharing options...
justsomeguy Posted January 18, 2012 Share Posted January 18, 2012 Depending on what it exactly is that takes too long, you can use the developer tools in a browser to look at the timing for all of the requests that go out to figure out which ones are taking so long. Link to comment Share on other sites More sharing options...
son Posted January 19, 2012 Author Share Posted January 19, 2012 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 More sharing options...
dsonesuk Posted January 19, 2012 Share Posted January 19, 2012 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 More sharing options...
justsomeguy Posted January 19, 2012 Share Posted January 19, 2012 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 5secThat'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 More sharing options...
dsonesuk Posted January 19, 2012 Share Posted January 19, 2012 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 More sharing options...
dsonesuk Posted January 19, 2012 Share Posted January 19, 2012 Another problem is that with some image formats they have a tendency to also save unnecessary data that is not required, which will bump up the file size, there are applications that will remove this unwanted data while maintaining the same image quality. Link to comment Share on other sites More sharing options...
justsomeguy Posted January 19, 2012 Share Posted January 19, 2012 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 More sharing options...
dsonesuk Posted January 19, 2012 Share Posted January 19, 2012 We always test to a specific speed, if it loads within that speed less than 5 sec, its considered good and no adjustment is required. Link to comment Share on other sites More sharing options...
son Posted January 24, 2012 Author Share Posted January 24, 2012 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 More sharing options...
justsomeguy Posted January 24, 2012 Share Posted January 24, 2012 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 More sharing options...
son Posted January 25, 2012 Author Share Posted January 25, 2012 Yes. There it is a Javascript Gallery and I will certainly try to figure this out... Thanks for your suggestion. Son Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.