Does only one image need to be loaded?

Discussion in 'HTML & Website Design' started by gkgk11, Jun 13, 2007.

  1. #1
    Ok this might seem like a stupid question, but anyways.

    If someone visits your website and you have 5 of the same image, does the loading time increase for each image that is loaded? Or does only one copy of the image need to be downloaded?
     
    gkgk11, Jun 13, 2007 IP
  2. WTM

    WTM Peon

    Messages:
    500
    Likes Received:
    17
    Best Answers:
    0
    Trophy Points:
    0
    #2
    As long as it is the same image - it will be loaded only once, no matter how many times you are using it.
     
    WTM, Jun 13, 2007 IP
    gkgk11 likes this.
  3. ajsa52

    ajsa52 Well-Known Member

    Messages:
    3,426
    Likes Received:
    125
    Best Answers:
    0
    Trophy Points:
    160
    #3
    I think it will be loaded only once on recent browsers.
    But you can check by yourselft using a BIG image (to see how is loading) several times on same page.

    To be sure on older browsers, you can force a cached load with javascript:
    
    uri = new Image();
    uri.src = "picture.gif";
    
    Code (markup):
    And then you can use "picture.gif" on several HTML <img> tags.
     
    ajsa52, Jun 13, 2007 IP
    gkgk11 likes this.
  4. hazeyindahead

    hazeyindahead Peon

    Messages:
    14
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    0
    #4
    The picture only needs to be downloaded once, afterwards it can be displayed as many times as you code it to be.
     
    hazeyindahead, Jun 13, 2007 IP
    gkgk11 likes this.
  5. gkgk11

    gkgk11 Peon

    Messages:
    1,053
    Likes Received:
    22
    Best Answers:
    0
    Trophy Points:
    0
    #5
    Thanks reped you all.
     
    gkgk11, Jun 13, 2007 IP
  6. grusomhat

    grusomhat Peon

    Messages:
    277
    Likes Received:
    5
    Best Answers:
    0
    Trophy Points:
    0
    #6
    It will only load once. This is why repeating backgrounds are great. A 1px x 1px image will fill the whole page without load times suffering. It's how well designed sites work :)
     
    grusomhat, Jun 13, 2007 IP
  7. leede

    leede Guest

    Messages:
    3,381
    Likes Received:
    128
    Best Answers:
    0
    Trophy Points:
    0
    #7
    same image must load once is definitely enough, why not?
    it is going to the memory which stores it!!!
     
    leede, Jun 13, 2007 IP