Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

inline essentially causes the code to load twice? #22

Open
whats1thingnow opened this issue Apr 15, 2016 · 1 comment
Open

inline essentially causes the code to load twice? #22

whats1thingnow opened this issue Apr 15, 2016 · 1 comment
Labels

Comments

@whats1thingnow
Copy link

whats1thingnow commented Apr 15, 2016

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!

@bezoerb
Copy link
Owner

bezoerb commented Jun 11, 2016

@whats1thingnow that's true. Critical also supports an extractoption 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 addyosmani/critical#39 for further insights

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants