Nuxeo mailing list archives
[Nuxeo-tickets] Re: [Nuxeo Repository] #837: Refactoring CSS and
JavaScript declaration
Nuxeo Repository
trac at nuxeo.com
Mon Mar 26 17:00:23 CEST 2007
#837: Refactoring CSS and JavaScript declaration
-------------------------------+--------------------------------------------
Reporter: bdelbosc | Owner: madarche
Type: enhancement | Status: new
Priority: P2 | Milestone: CPS 3.4.5
Component: CPSDefault | Version: TRUNK
Severity: normal | Resolution:
Keywords: css js javascript |
-------------------------------+--------------------------------------------
Comment (by jmorliaguet):
considering javascript resources, there is a simple optimization that can
be done:
for a given site, go through all portlets, gather the javascript resources
into a single file and place them in a global "per site" cache. The cache
needs to be invalidated when a portlet is modified / added / removed.
Note that some existing sites might break (in cases where the javascript
code is dependent on the actual HTML content of the page, this can
happen), so this ought to be implemented as a new option for instance in
the theme's tool (for example: [x] use a global file for javascript
resources).
that's a "pull" model since you collect all resources from existing
portlets. The advantage is that it is easy to implement, it only requires
small modifications from the existing code, the drawback is that it can
lead to a large javascript file, but thanks to the server-side cache and
the browser cache / gzip possibilities it really doesn't matter.
the other model is to push resources into the <head> of the page, it is
the way I would implement it today, as long as the result of the
concatenation of all the resources can be easily cached per key (that's
the case in nxthemes where resources are per theme/page/perspective/mode).
for CSS the issue is different since portlets do not declare CSS resources
--
Ticket URL: <https://svn.nuxeo.org/trac/pub/ticket/837>
Nuxeo Repository <http://www.cps-project.org/>
Nuxeo Repository
This list archive provided by Nuxeo, the
leaders of open source ECM.
Check out the Nuxeo 5 open source,
standards-based ECM project.