[dev] potential optimizations: static css and javascript
Chuck Hagenbuch
chuck at horde.org
Thu Oct 7 20:53:30 PDT 2004
I was thinking this evening that it might be time to give up on the html.php
theme files and css.php processor script - it's probably just a barrier to
theme designers to not have straight .css files, and as far as I can tell, we
don't really use the ability to override things programattically all that much
anyway. Browser checks can be done other ways, etc. And it'd allow for better
caching, etc. The idea would be to leave the theme config files in
config/themes for things like graphics and whatnot, and to add a css/ directory
(name/location negotiable) to each app that'd hold top-level css files
(screen.css, print.css, etc.) with a themes/ directory for theme-specific
versions of those. We'd include two stylesheets (horde and app) explicitly in
apps that added their own css, but that's not a problem that I can see.
While I was at it, it seemed prudent to add a js/ directory as well for .js
files that really are static and don't need *any* PHP; no reason to involve
javascript.php in those. The files that really do need PHP can stay in
templates/javascript but be renamed to .php, and Horde::addScriptFile() can
check the file extension to figure out where to find it.
It also occurs to me that these could both be combined into a static/ directory,
but I'm not sure I like that.
What do folks think? I don't think it'd be too much work to get it done (I'd
script a bunch of it) and obviously if we're going to change how the themes
work doing it before 3.0 release would be key.
-chuck
--
"But she goes not abroad in search of monsters to destroy." - John Quincy Adams
More information about the dev
mailing list