This is Interesting: Free Magazines for Graphics designers and webmasters
Home > Archive > Stylesheets > January 2005 > loading IMGs vs background-images, speed of
You are viewing an archived Text-only version of the thread.
To view this thread in it's original format and/or if you want to reply to
this thread please [click here]
| Author |
loading IMGs vs background-images, speed of
|
|
| Manatee 2005-01-20, 11:19 pm |
| Hi group. I had been setting background-images for some page
elements, which seemed to load absolutely last, and I was
wondering if the pics would appear earlier/faster if I used
IMG tags instead.
If I do stick with background-images, do you think it
matters where the rules are -- in an external stylesheet or
inline rules, e.g.?
| |
| Steve Pugh 2005-01-20, 11:19 pm |
| Manatee <manatee@thesea.au> wrote:
>Hi group. I had been setting background-images for some page
>elements, which seemed to load absolutely last, and I was
>wondering if the pics would appear earlier/faster if I used
>IMG tags instead.
Maybe. A browser can request a foreground image as soon as it
encounters the <img> in the code. But it can only request a background
image once it's (a) downloaded the CSS file and (b) parsed the HTML
document to see if the particular style rule in question is used.
Of course if the image is content then it should be an <img>
regardless.
>If I do stick with background-images, do you think it
>matters where the rules are -- in an external stylesheet or
>inline rules, e.g.?
If your CSS file is very large or otherwise slow to download then it
might help. But the browser still needs to download and parse the HTML
before it can request the background.
Steve
| |
| Pandabear 2005-01-22, 11:15 pm |
|
Manatee <manatee@thesea.au> wrote:
Steve Pugh <steve@pugh.net> wrote:[color=darkred]
> Maybe. A browser can request a foreground image as soon as it
> encounters the <img> in the code. But it can only request a background
> image once it's (a) downloaded the CSS file and (b) parsed the HTML
> document to see if the particular style rule in question is used.[...]
Thanks Steve. The images are more decorative than content,
but I think I may have to switch to IMG tags to eliminate
some of the delay (for the record, it seems a little faster
so far :) ). M
|
|
|
| | Copyright 2003 - 2008 forum4designers.com Software forum Computer Hardware reviews |
|