-
Notifications
You must be signed in to change notification settings - Fork 119
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
Render-blocking CSS #318
Comments
From what I can tell, it is recommending inlining your "critical" CSS. Hopefully there is an easy way to identify this? Once identified you could inline this yourself, or define an nth bundle with the critical CSS content and inline it using the functionality discussed here - just note that it will not do any rewriting for relative paths (because it is not actually written to the file system). So if you have image urls specified in the "critical" bundle for example, make sure they use absolute or site-relative paths. |
I'm not entirely sure that inlining the critical content would be enough to satisfy that check so let me know what you find out. If you need to use javascript to defer CSS loading we could probably add a new Render method that emits the URL instead of a tag if that helps? Not really sure what the best approach is there I will try to read up on it in the near future. |
I think if you had the option to just render the Url instead of a full tag, then it would be very helpful 👍 |
Sorry I forgot to circle back on this. I don't think this is really feasible because of the way SquishIt acts at debug time (rendering individual tags for each element). I'm wondering if there's a way we could render with basically a format string, where you supply a block of text that is rendered "around" each resource? It would probably not be optimal but may be doable. In the meantime you could use something like this I guess?
|
I use Google page speed to try and make sure my sites are as fast as they can be. But I am stumped on this one. It flags the minified CSS that squishit creates and says it should use the following
https://developers.google.com/speed/docs/insights/OptimizeCSSDelivery
Snippet from Google PageSpeed insights
Any idea how I could achieve this with Squishit?
The text was updated successfully, but these errors were encountered: