Results 1 to 7 of 7

Thread: Does Anyone Know If...

  1. #1
    You do realize by 'gay' I mean a man who has sex with other men?
    Join Date
    Oct 2003
    Location
    New Orleans, Louisiana.
    Posts
    21,635

    Does Anyone Know If...

    You only add one image size attribute to a graphic on a HTML if that only speeds up the load time of that image by 1/2?

    It sounds like a stupid question i know

    I do know that if you add both the height="" and width="" tag that speeds the page load time up but what if you only have one of the dimensions as a constant?

    Regards,

    Lee


  2. #2
    BDBionic
    Guest
    I tend to leave the height and width elements out because it interferes with scrolling on some browsers and slows it down so I dunno hehe

    edit - if resized from it's original size to display as something else, that is...

    ... do you mean just putting in the actual dimensions of the image in to the HTML as well or resizing how the images are displayed?
    Last edited by BDBionic; 05-29-2004 at 01:56 AM.


  3. #3
    Dawgy
    Guest
    Originally posted by BDBionic
    I tend to leave the height and width elements out because it interferes with scrolling on some browsers and slows it down so I dunno hehe

    edit - if resized from it's original size to display as something
    you should never do that... display an image at its actual size, otherwize youre wasting bandwidth and slowing down your page load, not to mention most images look icky resized by a browser.


  4. #4
    You do realize by 'gay' I mean a man who has sex with other men?
    Join Date
    Oct 2003
    Location
    New Orleans, Louisiana.
    Posts
    21,635
    Brian,

    The actual image size is 400x600 for example and i put in width=400

    Dale is right too btw, you should always use the image dimensions as it really does speed up the load time on pages

    Im hoping i can still have a decent load time while cutting back some un-needed code by only putting in the width attribute.. yeah im lazy

    Regards,

    Lee


  5. #5
    virgin by request ;) Chilihost's Avatar
    Join Date
    Oct 2003
    Posts
    4,496
    Lee, I think that if you take a look at a page with both height & width vs one with just height, you will see the total page size is maybe a couple of bytes bigger. The total size of the page is what will speed/slow things but in all honestly most pages are only a few kb, it is the images that slow down load times cuz they are in the 30-40 mb range for a 400x600. Its really not worth it to cut out that small tag. If you want speed things up cut your image sizes down or use flat html pages and not php pages.

    Oh, one other thought, adding in h & w attributes stops the page from jumping all over the place upon loading while the browser tries to figure out the pic dimensions, which is easier on the eye while waiting for the page to load.

    cheers,
    Luke


  6. #6
    Hammer
    Guest
    I've never noticed that not hardcoding the image size affects the page load time appreciably unless those images change the layout of the page when they load. In other words, if you lay out your page with tables that hold the images and text and format the page properly so if you loaded it without the images the layout would be the same, then there is no real change in load time.

    What happens frequently is that people don't lay out their pages properly and paste pictures in without using tables to constrain the layout. When they do that -- unless they hard code the image dimensions -- the page starts loading with the text flush left for example and then when the image starts loading the page has to redraw to move the text over and make room for the image.

    So, your choice is to hard code the image dimensions in or use tables to hold the images, so that either way, the browser knows to start loading the page with the type where it belongs and then when the images load in they load into the blank spaces that were predefined.

    I'm guessing that Luke made a typo though when he said that a 400x600 image averages 30 to 40mb. I'm sure he meant 30 to 40k.

    P.S. I don't know if it's random or will stay, but right now the text below my avatar photo says something somewhat derogatory. It reads "Straight white men are the plain vanilla in the ice cream parlor of life." I'd just like to point out that I am definitely not vanilla and consider myself more Rocky Road.
    Last edited by Hammer; 05-29-2004 at 11:44 AM.


  7. #7
    virgin by request ;) Chilihost's Avatar
    Join Date
    Oct 2003
    Posts
    4,496
    Hammer, or should I call you Mr. RockyRoad , yup that was a typo on my part thanks for pointing it out.

    cheers,
    Luke


Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •