Surely you can just test by pointing a CSS file at some kind of simple
server that echos to the console whenever it gets a request.  If you ran it
on your local machine it should be reasonably accurate.  I've got a little
java HTTP mirror server thing you could use actually.

http://www.danwebb.net/code/mirror2.jar

To use it download that then set it running on your computer by copying it
somewhere on your hard drive then typing into your command prompt or shell
or whatever:

java -jar mirror2.jar 8000 

Where 8000 is the port number you want to run it on.  Then go through your
CSS and change your background image references to
http://localhost:8000/nameofyourimage.gif.  Now if you try to open your page
the CSS will try to get the image from the mirror server and the mirror
server will simply output the request to your console so you'll be able to
see what order and when the images are requested in on various browsers.

Hope that makes sense.  I think it's definitely worth an investigation as
understanding this could help us optimize pages more.

There's not too much point in theorizing what you think the browser will do
- it's time to put it to the test!  If someone wants to put a test page
together (with images in the CSS that point to
http://localhost:8000/whatever) then I'm up for doing a bit of testing.

Cheers,

Dan W

-----Original Message-----
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On
Behalf Of Justin French
Sent: 19 July 2004 19:58
To: [EMAIL PROTECTED]
Subject: Re: [WSG] Re: Does a CSS file load all graphics or only page
relevant ones?

On 20/07/2004, at 2:03 AM, Chris Stratford wrote:

> I cannot provide any proof of this.
> but I believe it would only load it when its displayed.
> the CSS wont parse and execture BANNERPAGE2, unless its caled from 
> Page2.HTML

I too believe this is the way it's *intended* to work, although there 
are some browsers out there which misbehave.  Safari 1.0 was one such 
browser (Mac OS X Jaguar), downloading all background images at once, 
but it was fixed in 1.1 or 1.2 (Panther), so it now only downloads the 
images as needed.

---
Justin French
http://indent.com.au

*****************************************************
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
***************************************************** 

Reply via email to