Do background .gifs load faster than SRC .gifs?

Discussion in 'HTML & Website Design' started by oimachi, Aug 29, 2007.

  1. #1
    I want to display rounded cornes as 4 gif files for my tables.

    What is better and faster loading, background gifs or a simple .gif?

    I mean what is the difference between:

    background="glossyback.gif"

    and:

    src="glossyback.gif"


    Also, if I have let's say 30 little gif files that I need repeated on the page. Instead of having the browser reload them 30 times in a row....

    Is there a way to make the loading faster with cache or something?

    I know this is basic stuff but it's been so many years I just forgot!

    THanks
    http://www.anonsolutions.com
     
    oimachi, Aug 29, 2007 IP
  2. Corey Bryant

    Corey Bryant Texan at Heart

    Messages:
    1,126
    Likes Received:
    51
    Best Answers:
    0
    Trophy Points:
    0
    #2
    They should load from the cache if they are the same file (of course it also depends on how the end user has his / her browser settings)

    You should be using CSS to load your background images instead
     
    Corey Bryant, Aug 29, 2007 IP
  3. twistedspikes

    twistedspikes Notable Member

    Messages:
    5,694
    Likes Received:
    293
    Best Answers:
    0
    Trophy Points:
    280
    #3
    isn't background="" depreciated?
     
    twistedspikes, Aug 29, 2007 IP
  4. AstarothSolutions

    AstarothSolutions Peon

    Messages:
    2,680
    Likes Received:
    77
    Best Answers:
    0
    Trophy Points:
    0
    #4
    There would be no difference in load speed between the two options you have mentioned.
     
    AstarothSolutions, Aug 30, 2007 IP
  5. Stomme poes

    Stomme poes Peon

    Messages:
    3,195
    Likes Received:
    136
    Best Answers:
    0
    Trophy Points:
    0
    #5
    As for knowing when to stick in the background and in the html, here's the question to ask yourself: if the image part of the content? Rounded corners on a table has nothing to do with your content, so they should go in the background. A page about seals with photos of seals, then those images should be in the html. So should a logo.

    An image is the same size no matter where it sits, so the loading times should be the same.

    And Corey is right: you should have a CSS page with
    #nameofsection {
    background-image: url(glossyback.gif)
    }
     
    Stomme poes, Aug 30, 2007 IP
  6. DominoBB

    DominoBB Peon

    Messages:
    48
    Likes Received:
    2
    Best Answers:
    0
    Trophy Points:
    0
    #6
    Maybe some people will argue with me but I believe background images load harder. If the src image is really big than the bg image will load faster but i've seen many case in wich src images load before bg images. I think there is a priority or something for src images and only after that for the css bg images.
     
    DominoBB, Aug 30, 2007 IP