<LINK rel=STYLESHEET TYPE="text/css" href="/style/USERNAME.css"> # style is a CGI/handler in the main path
Now when you generate the CSS code for them it "looks" like it's coming from a file and you can further spoof browsers into caching the data by sending the header:
Last-Modified: Fri, 22 Sep 2000 19:24:17 GMT
If you store a last changed date with the users prefs, you can make a cheesy HEAD/Conditional-GET that just grabs the change date and returns the 304 Unchanged response if the dates match. With just a little more work, the browsers cache the stylesheet and you beat up on your DB just a little less. That is a bandwidth and sanity win all the way around.
There are a lot more tweaks you can throw at it. I've got a conditional handler laying about somewhere for Mason, I think. I started to do this very same thing but haven't yet bothered with customizability since I'm working real functionality on the site I'm doing.
--
$you = new YOU;
honk() if $you->love(perl)
In reply to RE: Parsing and Spewing CSS
by extremely
in thread Parsing and Spewing CSS
by davemabe
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |