Store Meta / JS / CSS in buffer

Would it be possible to store meta, css, & js in a buffer array until
the layout is rendered?

I am not sure how I would go about this but what I'm thinking is if
there was a way to append values to an array, then call the array when
the layout is rendered to combine all JS, CSS, and meta headers in the

Perhaps we could have a function like appendCSS, appendJS, and
appendMeta. This would allow for combining entries and pass them to
the jsmin to compress.

This would also allow for passing css & js specific files from Widgets
into the layout.

Just thinking out-loud.

In designing such functionality keep in mind that it's considered best
practice to render JavaScript at the bottom of page. That said some
libraries still must be included at top (modernizr.js comes to mind).

Billy Cravens


What I was thinking is to have the addAssetCSS(Header=true), addAssetJS(Header=true), etc…

and then you could call the groups of array cssHeaderArray and cssFooterArray. The groups could be minified via jsmin and combined together in a single cache file for header and for footer.

Jeremy R. DeYoung