James;

Indeed, you are right - thank you for reminding me about the HTTP connections, which reminds me to combine the style sheets and the _javascript_s, for the sake of clarity at this point they are individual ones.

If you are right (hope to hear from more people on this subject) that the image is only loaded if it is actually used on the page. Then this tool becomes obsolete at www.websiteoptimization.com since that was the one that denied to load the page since it became over a MB in filesize and it wanted to load all the images that were defined as backgrounds in the CSS.

I did do them as backgrounds in CSS to separate style from content in this case, but if it in fact is loading the whole thing as the websiteoptimization.com web site suggests, I guess I have to rethink and actually include the image in every separate page.

  I really hope that you are right, and as for the 'rest' of browsers (Opera, Safari, Amaya et al) becomes a non issue since it's only FF and IE that are allowed in this corporate world (they are actually pushing to rid systems of IE and have FF corp wide)

   Regards
     ~Veine

At 08:29 AM 6/14/2006 +1000, you wrote:

There's also the overhead of establishing a new HTTP connection for each 'reference' to consider.
For that reason, it's better to reference large file(s) instead of multiple small files where possible. Such as combining stylesheets or external scripts on the server-side into a single file, and using the image sprite technique to combine multiple small images.

As for loading, my understanding is the browser will load images defined in stylesheets after the page has finished loading.
Also images defined in stylesheets are only loaded if they are referenced by an HTML element.
So if you're only "using" 1 of the 5 CSS classes you've defined, only 1 of those background-images _should_ be loaded.
I only know that from my own little tests with FF and IE, so nothing's to stop other browsers from loading everything. I'm not familar with the CSS specification, maybe theres's something mentioned there?

On 14/06/06, Paul Bennett <[EMAIL PROTECTED]> wrote:
Hi Veine,

'the only dumb question is one that goes unasked' :)

The Big Brains will hopefully chime in soon, but I'm guessing it will depend upon the cache setting of the clients browser.

Most people will leave the cache settings unaltered so the browser will cache your images and CSS file, then reuse them when another page calls the same files.

The big slowdown will occur when people first load the page - if you're referencing 11 *different* image files at 50Kb each, that's (counts on fingers).... 550Kb - which is way too large.

Does that help?

Paul

-----Original Message-----
From: listdad@webstandardsgroup.org [mailto: listdad@webstandardsgroup.org ] On Behalf Of Veine Vikberg
Sent: Wednesday, June 14, 2006 9:14 AM
To: wsg@webstandardsgroup.org
Subject: [WSG] How does CSS handle it's references

Greetings;

Now this may be one of the most basic questions I have ever asked on this list - and make you laugh at me but...

Here goes, if a stylesheet has a reference to three classes, each of which has an image as background that is 50K - when that stylesheet is used in another page, does that image get loaded before the page is displayed?

  I hope I make sense here, what spurred the question is that I have used an online web speed checker, and it refused to load the page, saying it was too big, cause my style sheet has 11 of those references for this partcular internal site, so the speed isn't really the issue, but I was thinking about other projects.

  Regards
    ~Veine




________________________________________________________________
Sent via the WebMail system at vikberg.net






******************************************************
The discussion list for  http://webstandardsgroup.org/

See http://webstandardsgroup.org/mail/guidelines.cfm
for some hints on posting to the list & getting help
******************************************************



******************************************************
The discussion list for  http://webstandardsgroup.org/

See http://webstandardsgroup.org/mail/guidelines.cfm
for some hints on posting to the list & getting help
******************************************************


******************************************************
The discussion list for http://webstandardsgroup.org/

See http://webstandardsgroup.org/mail/guidelines.cfm
for some hints on posting to the list & getting help
******************************************************

No virus found in this incoming message.
Checked by AVG Anti-Virus.
Version: 7.1.394 / Virus Database: 268.8.3/362 - Release Date: 6/12/2006

Veine K Vikberg
President

þ Website Design & Development
þ IT Service Management
þ Search Engine Marketing Specialist
þ E-mail Newsletter Specialist
Phone:
  877.891.7310
Fax:  877.891.7310
E-Mail:
[EMAIL PROTECTED]
******************************************************
The discussion list for http://webstandardsgroup.org/

See http://webstandardsgroup.org/mail/guidelines.cfm
for some hints on posting to the list & getting help
******************************************************

 

No virus found in this outgoing message.
Checked by AVG Anti-Virus.
Version: 7.1.394 / Virus Database: 268.8.3/362 - Release Date: 6/12/2006


******************************************************
The discussion list for  http://webstandardsgroup.org/

 See http://webstandardsgroup.org/mail/guidelines.cfm
 for some hints on posting to the list & getting help
******************************************************

Reply via email to