I know this question got a lot of answers, but I'm using a little trick (which requires JavaScript to be enabled) that seems really effective - even for a browser like Chrome that tries to display pages as soon as possible.
If the compressed and optimized file is still too slow, this can do the trick.
Often, a lot of CSS is often used for interactive content; such as: hover ,: focus, etc. These styles do not need to be loaded immediately, and you can load them after the page has fully loaded.
Therefore, I would recommend moving all the styles: hover and: focus, or just any class style that is used for content that is visible only through interaction into a separate CSS file. Then upload this separate file after the main HTML content has been fully rendered in JavaScript (jQuery example):
$(document).ready(function () { //Render Interactive CSS: var Link = document.createElement('link'); Link.rel = 'stylesheet'; Link.href = '[Relative Interactive CSS File URL]'; var Head = document.getElementsByTagName('head')[0]; Head.parentNode.insertBefore(Link, Head); }
Referring to this guide: https://developers.google.com/speed/docs/insights/OptimizeCSSDelivery#example
For me, this has greatly improved even small Interactive.css files.
Hope this helps!
source share