[Seaside] CSS/JS libs
Brian Brown
rbb at techgame.net
Tue Jun 22 20:37:06 CEST 2004
> What I'm leaning towards as a simplification is to abandon the idea of
> bringing in stylesheets and supporting scripts as needed on particular
> page views, but to work at a much coarser granularity: styles and
> scripts will be grouped into "libraries", and each application will be
> configured with which libraries it includes. All of the styles and
> scripts in the included libraries will be referenced from the <head>
> of every page in that application. The URLs for each individual
> snippet of CSS or JS are immutable and have no expiry date, so the
> browser should cache them indefinitely. However, this will increase
> load times for the very first page of the application, and it will
> doubtless mean having some scripts and styles included that don't get
> used at all.
>
> What are people's thoughts on this?
>
I think this is a perfectly reasonable approach. In many cases a single
library will be sufficient, and for those apps where a plethora of
styles/scripts are used, the number of needed libraries can be
increased, even though the amount of styles/scripts in a particular
library can be small.
It will just take a bit more thought in the beginning as how the
libraries should be broken up. I doubt that the startup time for the
first page will even be noticeable.
my 2 cents,
Brian
More information about the Seaside
mailing list