Hi Ludovic, Just found this email in my inbox, and was surprised by the similarity with the Skin Extensions proposal.
Ludovic Dubost wrote: > > Currently the albatross skin loads around 10 js and 10 css, which is > quite a lot. > We can improve loading time by: > > - compression and cache (raffaello will provide Apache configs specific > to XWiki to help for that) > - merging and optimizations of css/js (I've published > http://www.xwiki.org/xwiki/bin/view/Code/MergeCSS to help on that) > - removing unused css/js (now we need to find which one are unused) > - conditional loading of css and js. > > This last improvement can help us a lot since some of the css/js are not > even used in view mode, or are only used by a specific panel. > For this my proposal is to add a feature to the core to allow > conditional loading of CSS and JS files. > The current macros in the header would instead of putting CSS and JS add > a placeholder for additional CSS and JS. > Then everywhere where we need these CSS/JS (in a panel, in a wiki page, > in a template) we would call a macro #includecss or #includejs > This macro would add in the context the CSS and JS to add. > At the end of the template rendering the placeholder would be replaced > by the added CSS and JS. > The page would be served. > > This would allow to manage the way CSS and JS are added. > > WDYT ? > > Ludovic > -- Sergiu Dumitriu http://purl.org/net/sergiu/ _______________________________________________ devs mailing list [email protected] http://lists.xwiki.org/mailman/listinfo/devs

