On Sep 18, 2005, at 6:17 PM, [EMAIL PROTECTED] wrote:

a) it's more efficient because the style sheet only gets downloaded once!
  b) you can reformat your whole site just by changing the CSS file!
...
In other words, what do you do to ensure that your newly-updated stylesheet isn't cached? In the past, I've resorted to doing this:

  <!--#include virtual="link-rel.txt" -->

where link-rel.txt contains

  <link rel="stylesheet" href="/css/2005-09-18.css" type="text/css">

so that when changes are made, I can just change the include to refer to "2005-09-19.css" and be sure there's no caching going on.


There are two kinds of caches: client, and proxy.

Client side caches are set such that their handling of css is analogous to the handling of images. The settings can be changed, and some browsers (Mac IE comes to mind) aren't very good at handling the settings properly.

The other type of cache is the proxy cache. If it is not configured properly, they will deliver your old CSS rather than checking to see if there is a new one. This is difficult to thwart, and it seems this is what John wants to tackle.

The problem with John's solution, as I see it, is that if the proxy cache is configured improperly and delivering old documents, then it will also deliver the old version of the page that John's SSI has changed (the old version having been viewed by someone else behind the same proxy). Therefore, the page the browser renders will request the old CSS file.

This solution would only seem to thwart the process if no previous viewer behind the same proxy viewed the same page. Even in this case, it could be more jarring than necessary, as the more recent viewer sees a cached page with the old design, then a new page with the new design, then another cached page, etc.

Web standards, outside of the code, include the HTTP protocol. It has caching mechanisms built in. Rather than a discussion about avoiding those mechanisms, it might be more effective to have a discussion about how to properly interact with them.

The original statement, that the stylesheet is downloaded once, is in comparison to presentation markup. If the markup is in the page, then its redundant code is indistinguishable from the content. By separating the presentation from the markup, the systems involved can separate how they treat it. The statements are not inherently contradictory, although atypical use may illuminate trouble spots; they are talking points because they simply could not be considered prior to CSS.

--

    Ben Curtis : webwright
    bivia : a personal web studio
    http://www.bivia.com
    v: (818) 507-6613




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