Click here to Skip to main content
14,732,788 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Friends, I have a photo gallery in my project where photos urls are stored in database and I am using datalist with stored procedure to display the photos page wise. I have given the clients to select the page size up to 60 according to their choice. But the problem is that if the page size increases more all the photos do not get loaded. However there is no problem if it runs in the server. I tried to sort it out by increasing the "httpRuntime executionTimeout" in the web config file but could not succeed. Please help me out
Posted
Comments
Prasad Khandekar 24-Mar-13 10:43am
   
Where are the photos located? You may want to optimize images for web publishing. There are many freeware tools available that optimizes the images without degrading their quality. Please also take a look at this article (http://www.ckode.dk/server-configuration/tuning-iis-7-for-static-content/)
Brajabas 24-Mar-13 11:26am
   
The photos are located in a folder. Optimizing the photos will definitely decrease the loading time of the images which I intend to do now. But at the same time I would like to increase the time out response time at least for that particular page so that even if the net connection is slow, the photos get loaded slowly. Thank you
Prasad Khandekar 24-Mar-13 12:05pm
   
I suppose that you are not streaming the images using a handler. You probably are outputting an HTML with img tags. If this is the case then you need to try and tune the IIS itself. Please have a look at second link.
jkirkerx 24-Mar-13 16:35pm
   
If the server creates the page HTML, with all the image url links, and transmits it back to the browser, then the page transfer and load is complete.

The browser is in charge of loading all of the images for the image url's through individual request for each image to the server after the page is served.

I resize the images on upload, making a thumbnail 200x200, and a full view size, 640x480 to optimize load times. Sounds like you built a monster, with no respect or math for page load times.

[edit]
In the old days, we used 28K modems, and our programs ran on limited ram and a 386 chip, so we always had to measure the size of everything. Still applies today.
Brajabas 29-Mar-13 8:15am
   
Reducing the sizes of the images during uploading is definitely contributing in loading the images and there is no problem in displaying up to 60 images. Although, it has sorted out my problem, I would like to learn how to display the same images if the image sizes are more, say 4mb each. Thank you...
jkirkerx 29-Mar-13 12:40pm
   
Think of it as smoke and mirrors or magic.

You want to create your interface so that you show the many possibilities of what you can view in small size images or thumbnails, which provides you with quick load times, and give the illusion to the user that the page loaded super quick.

Al long as your design gives the perception that the page is loading fast, and that there is action such a progress wheels where the thumbnail image is suppose to be, that converts to the image when the browser downloads the image, then the user will not question the page load time nor take the time to measure the actual amount of time it took to complete.

Now that your images are loaded, you use Javascript to allow the user to click on the image or thumbnail of choice, and expand that image to the larger size,

So....

you can create an area or container for the large view image to occupy, or load that large image in a modal container.

I use Adobe Illustrator to create images, and I can export them for web use. I can select the quality of a JPEG, from low, medium and high, which makes a huge difference in file size. Most images can be low or medium, unless there are gradients, in which you need high.

So my rule of thumb is, I use PNG for template art, and JPEG for photo art and photos for better compression.

A 4 meg image is huge, and can take up to 1 minute to download. I'm guessing that's about 6 megapixels, which is not needed on a website. 1024x768 is about the largest you want to go, unless your selling photos.


1 solution

The httpRuntime executionTimeout" is for the amount of time the server can consume for processing server side code.

Consider caching and compression for delivering static content, and using jpeg images for the smallest image size possible, which still looks good.

http://bradkingsley.com/enable-caching-in-iis-to-speed-performance/[^]

http://www.iis.net/configreference/system.webserver/httpcompression[^]
   

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)




CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900