Drake, Ted C. wrote:
Here’s the deal. I have a main navigation css. I’d like to create an
alternate template and instead of replacing the nav.css with a new
flavored nav.css, I’d like to put my color rules in a theme css file.
Since I've only glanced at the solutions referred to in some of the
other post, I might be wrong, but it seems that they all break the
caching aspect of CSS as well as requiring the re-parsing of the style
sheet each time. There is no need for this to happen.
For starters, have mod_rewrite redirect all CSS requests to the template
engine and have the desired "style sheet" as a query string. The style
sheet template and values to be inserted can be stored either as files,
in a database, or a combination. The engine pulls the time stamp from
the template and the values, compares them to the time stamp in the HTTP
headers, sets the outgoing headers to reflect if it's sending a style
sheet or not, and finally, parses the template only if needed.
This technique can be extended (and possibly abused) to take advantage
of other header, cookie, or session info.
Another option is store frequently accessed style sheets on the server
pre-parsed.
******************************************************
The discussion list for http://webstandardsgroup.org/
See http://webstandardsgroup.org/mail/guidelines.cfm
for some hints on posting to the list & getting help
******************************************************