grunt-critical
grunt-critical copied to clipboard
inline essentially causes the code to load twice?
As per readme:
If dest points to an Markup file (HTML, PHP, etc.) the resulting CSS gets inlined and the exiting stylesheets are wrapped in a JavaScript function to load them asynchronously as well as a
noscript
block for users with JavaScript disabled
So that means, the critical pieces will be loaded the 1st time inside of the HTML.
Then, 2nd, the same critical pieces will be loaded again asynchronously (along with the non critical)?
Thank you for clarifying!
@whats1thingnow that's true. Critical also supports an extract
option which removes the critical css from the source stylesheets. Keep in mind that this option might create different source stylesheets for different pages which will drop any caching benefits. See https://github.com/addyosmani/critical/issues/39 for further insights