Web Design Web Design Forum
Registration is free! Here you can view your subscribed threads, work with private messages and edit your profile and preferences Calendar Find other members Frequently Asked Questions Search
Home Web Design

Convenient web based access to our favorite web design Usenet groups

web design reviews

This is Interesting: Free Magazines for Graphics designers and webmasters  





  Last Thread  Next Thread
Author
Thread Post New Thread   

loading IMGs vs background-images, speed of
 

Manatee




quote this post edit post

IP Loged report this post

Old Post  01-21-05 - 04:19 AM  
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.?


Post Follow-Up to this message ]
Re: loading IMGs vs background-images, speed of
 

Steve Pugh




quote this post edit post

IP Loged report this post

Old Post  01-21-05 - 04:19 AM  
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



Post Follow-Up to this message ]
Re: loading IMGs vs background-images, speed of
 

Pandabear




quote this post edit post

IP Loged report this post

Old Post  01-23-05 - 04:15 AM  
Manatee <manatee@thesea.au> wrote: 
Steve Pugh <steve@pugh.net> wrote:
> 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


Post Follow-Up to this message ]
Sponsored Links
 





All times are GMT. The time now is 09:54 AM. Post New Thread   
  Previous Last Thread   Next Thread next
Stylesheets archive | Show Printable Version | Email this Page | Subscribe to this Thread

Popular forums

Adobe Photoshop forum Macromedia Flash Web Site Design
Dreamweaver FrontPage forum
JavaScript Forum XML forum
Style Sheets VRML
Forum Jump:
Rate This Thread:

 

XML RSS Feed web design latest articles Syndicate our forum via XML or simple JavaScript

Web Design archive  Database administration help  


Top Home  -  Register  -  Control Panel   -  Memberlist  -  Calendar  -  Faq  -  Search Top