Use non-blocking CSS
Open
enhancement
p3
- Dominant language
- JavaScript
- Stars
- 1.3k
- Forks
- 160
- PR merge metrics
- No merged PRs in 30d
Description
Currently donejs does something which goes against [PageSpeed](https://developers.google.com/speed/pagespeed/) recommendations and inserts all of the css into the head as ``s. This will block the page from rendering as these stylesheets are loaded.
We should change this and do a couple of things:
1. Inline "essential" styles directly in `` tags. This might just be the main css bundle. Ideally this could even be trimmed down to just selectors that are being used by the page.
2. Make the rest of the links be non-blocking by using something like [loadCSS](https://github.com/filamentgroup/loadCSS#recommended-usage-pattern).
Contributor guide
Assessment
This issue has not been assessed yet.