[dokuwiki] Re: Why css.php?

  • From: "Joe Lapp" <joe.lapp@xxxxxxxxx>
  • To: dokuwiki@xxxxxxxxxxxxx
  • Date: Wed, 10 May 2006 09:01:51 -0500 (CDT)

Hi Chris,

> Dokuwiki CSS now supports the use of substitutions making it easy to 
> change things like colours across a whole raft of different selectors.  
> Take a look at the css.ini file and also wiki:devel:css at splitbrain.

That is clever!  That has always been one serious drawback with CSS and cause 
for tons of duplicated code and search-and-replaces across stylesheets.  (I 
presume you meant style.ini.)

> The CSS file is cached by DokuWiki. I believe it is able to be cached by 
> browsers as well.

My understanding is that:

- The URL is the cache key
- The HTTP headers have to specify the downstream caching behavior

If true, then for caching to be possible, then it seems that css.php must 
produce the same stylesheet for all pages on the site, including plugin 
inclusions, and Dokuwiki has to produce special headers for css.php.

Am I right?  Where's our HTTP guru?

> The generated style sheet has been "sort of" compressed.  All comments 
> and all redundant whitespace have been removed including new lines.

Very smart!

>To 
> make the generated CSS file easier to view turn off css & js compression 
> in the config, e.g. $conf['compress'] = 0;

Where are you caching this fellow?  I can pull css.php up on Safari, but it's 
still compressed.

I wonder if we might be better able to take advantage of downstream caching if 
we added static and dynamic flags to each stylesheet in style.ini, and then had 
css.php?static (or ?dynamic), giving css.php and css.php?static different 
caching characteristics.

Thanks for explaining this to me.  I see the logic, it's very clever, 
work-arounds for CSS's shortcomings.

~joe
--
DokuWiki mailing list - more info at
http://wiki.splitbrain.org/wiki:mailinglist

Other related posts: