JuKu / JuKuCMS

Open Source CMS should be the fastest CMS world wide (WIP).
Other
5 stars 1 forks source link

Support inlining critical css / js #190

Closed PascalReintjens closed 6 years ago

PascalReintjens commented 6 years ago

While resolving #188 it would be also quite beneficial to have support to be able to inline critical ccs / js, as well as support splitting css into header and footer, like it's already present for js-files.

JuKu commented 6 years ago

nice idea! But this means also that css / js cannot be cached from browser.

PascalReintjens commented 6 years ago

But this means also that css / js cannot be cached from browser.

That is true, but there are cases where the performance benefit from inlining can be higher than from caching. Furthermore, not inlining critical css will result in a point penalty in google pagespeed. We should decide later wether we can ignore this pagespeed rule (in case it regresses performance) but neverless it would be great to have this option available.

JuKu commented 6 years ago

I have moved this to milestone 0.2.0, so we will implement this in the actual milestone.

PascalReintjens commented 6 years ago

After thinking about this a little bit, it is clear that we can already realize this by directly putting in the code into the corresponding .tpl file or for plugins using {$HEADER} and {$FOOTER}