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
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
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) }
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.