On Sun, 3 Apr 2005, Roman wrote:
I've run a "download times" test and it turned out that my css is
calling the 3 images every time a file is opened,
Please be more specific about this "download times test". Is it
monitoring the operation of some real browser (if so, what browser was
it?), or is it some self-contained utility which is simply retrieving
every URL that it can find? If the latter, then it might be that a
real browser would behave differently.
In any case, *even* if all 3 images were being retrieved, then so long
as your images are being sent out with proper cache validator
information, then any normal browser would be cacheing them on first
retrieval, and they'll do little harm thereafter.
Should I better have 3 stylesheets instead of only one?
I don't think there's a hard and fast answer to that one - "it
depends". Can the reader start browsing the page while the image(s)
are still being retrieved? It can be very annoying, on the *first*
visit to a page, being made to wait while extraneous decorations are
being retrieved, *before* the browser is willing to display the
substantive content. It's even *more* annoying if this happens on
*every* visit to the same page (as seems to happen with some
poorly-designed systems for dynamically building pages at the server,
but presumably we're not dealing with such a system in your case).
(I'd surely want to take a look at optimising the file size of the
images, regardless of these considerations.)