[thelist] Re: Safari cacheing all CSS bg images - solved

s t e f stef at nota-bene.org
Mon Jan 12 03:13:50 CST 2004


<quote who='Dunstan Orchard' when='09/01/04 17:49'>

> Ah, I see on the Safari web site (why didn't you go there before 
> Dunstan?) that this problem has been highlighted and fixed.
> 
> At least I hope it has, that's what Dave's post seems to imply.
> 
> http://weblogs.mozillazine.org/hyatt/
> http://weblogs.mozillazine.org/hyatt/archives/2003_12.html#004504
> http://weblogs.mozillazine.org/hyatt/archives/2003_12.html#004492
> 
> So, I guess the answer is: Go download a new versin of Safari :o)

Mmmmh. Let's consider for a minute that people won't upgrade, which is 
what happens most of the time (especially since more and more users 
don't know what a browser is -- this is fact, not rant).

Maybe you could try to dynamically generate your CSS with a parameter 
and list in it only the needed images.
Like this:
@import "/blog/include/day.php?night_clear";
(let's assume you'd do it with PHP)

Then your CSS (embedded in a php file with the right mimetype) would read:
#header {background: url(/blog/commonpics/night/clear-new-1.jpg) top 
right no-repeat;}
or:
#header .night-clear-new-2 {background: 
url(/blog/commonpics/night/clear-new-2.jpg) top right no-repeat;}

with the usual one-out-of-two random that you've used so far.

See what I mean?

I've been meaning to redo my site for quite a while now, and since I'm 
using this same kind of css selection I'll reconsider how the CSS is 
written. Never heard of the Safari bug before. Shame on me and all that.

Anyway. HTH.
-- 
s t e f
http://www.nota-bene.org/


More information about the thelist mailing list