[Product-Developers] Re: Where does it hurt?

Wichert Akkerman wichert at wiggy.net
Sun May 25 07:57:30 UTC 2008


Martin Aspeli wrote:
>
>
> On 24 May 2008, at 11:16, Wichert Akkerman <wichert at wiggy.net> wrote:
>
>> Previously Martin Aspeli wrote:
>>> Ricardo Newbery wrote:
>>>> On May 23, 2008, at 12:36 AM, Martin Aspeli wrote:
>>>>
>>>>> Wichert Akkerman wrote:
>>>>>> Previously Malthe Borch wrote:
>>>>>>> Reinout van Rees wrote:
>>>>>>>> From a caching viewpoint, I normally end up putting &dtml-
>>>>>>>> portal_url; everywhere into the css files to make sure all the
>>>>>>>> images and so are loaded from one place and not 20 times from /
>>>>>>>> img.jpg, /subfolder/img.jpg, /sub/sub/img.jpg and so on.
>>>>>>> This really isn't necessary; images referenced from a stylesheet
>>>>>>> are local to the url that contains the stylesheet.
>>>>>> The URLs for our stylesheets are dynamic.
>>>>> Are you sure? They're dynamic, but they only change if you re-save
>>>>> the portal_css configuration. If the caching proxy or the browser
>>>>> has cached an image at /portal_css/<random>/img.jpg then that's
>>>>> going to be stable, I think, until you re-save portal_css.
>>>>
>>>>
>>>> Hmm... I think one problem might be that the stylesheet will typically
>>>> be cached much longer than the images.  What happens when the dynamic
>>>> url changes (after a portal_css resave) but an externally cached
>>>> stylesheet is still referencing non-cached images via a url than is no
>>>> longer valid?
>>>
>>> Who cares?
>>>
>>> CSS is only going to change during development, when you don't have a
>>> cache server at all. Once it settles, it's going to be saved and not 
>>> change.
>>
>> That is not true. For a lot of sites it is not uncommon to tweak the CSS
>> occasionally.
>
>
> Who cares? Your cache then suffers for ten minutes. It's not like 
> you're going to go fiddle CSS on a mission critical server at a time 
> of high load.

You care because that CSS is cached for a year and your pages could be 
cached for up to a day with standard caching rules. Which means that for 
24 hours your site could be broken.

Wichert.

-- 
Wichert Akkerman<wichert at wiggy.net>    It is simple to make things.
http://www.wiggy.net/                  It is hard to make things simple.





More information about the Product-Developers mailing list