Click to See Complete Forum and Search --> : Images


daneb
August 17th, 2000, 02:46 AM
Hello! I have several questions reagrding images:

1)If you have a page containing several graphic images, are these images always downloaded even if it is not the first time you access this page?

2)If you set a width and height attribute which is half the original width and height dimension of your image in your IMG tag, does this mean that you will also download the image with reduced file size in bytes or KB?

Thanks in advance!

Lothar Haensler
August 17th, 2000, 03:09 AM
1) it depends on your browser. Most browser cache data in a local folder and downloaded pages and images only if there are newer ones on the server.

2)As far as I know it is a functionality of the browser to stretch or shrink an image. It's still based on the same img file.

daneb
August 17th, 2000, 05:17 AM
Thanks for the reply. For the second item's response, this means you are actually downloading the same original image file, whether it is re-dimensioned or not in your HTML code. I just want to clear something I have read in a book that says,

"Page loading is faster if you give the image a specified width and height, so that a space will be reserved for the image and the browser can continue laying out the rest of the page."

I think that this is also true because the user can see the rest of the page, especially those text content, while waiting for the image to be downloaded entirely and be fitted into that reserved space.

Rick Leinecker
August 24th, 2000, 01:18 PM
The entire image is definitely download unless it is already cached on the client machine. Adding width and height directives won't affect the time and bandwidth it takes to download the image.

The reason it's recommended to use a width and height dimension whenever possible is because the browser will first obtain the width and height if it doesn't already have it (in order to reserver room in the html rendering), and then download the image. Adding width and height directives eliminates this need and therefore one more request to the server.