inline css compacting

2007-09-07 @ 14:25#

saw a blog post today that shows how to write a quick (and easy) ASP.NET handler to compact CSS files at runtime. pretty nice code.

i've contemplated this in the past. even wrote a handler to support HTMLTidy work at runtime. but i never implemented it at a live site. my concerns:

  1. is this 'real-time' compacting reliable? (does it screw up files?)
  2. is the space saved worth the runtime perf hit (or do i now cache results - and 'uncache' them at the proper time?)
  3. i don't like the inline use of of ASP.NET *.ASHX?[file-arg] pattern in the actual document

for all these reasons, i am still skittish about it. but i have this on my list of things to pftuz with over the next few days to see if i can get answers to my questions.

code