Idea: add LoadCSS




Wordpress LScache Plugin: Idea: add LoadCSS

Last Updated on: Wed, 15 Apr 2026 00:00:02
You, guys, are doing an incredible job! Sometimes, Im think my WordPress website is a static website? its crazy! So, something you can easily is LoaddCSS: https://github.com/filamentgroup/loadCSS Example: var loadCSSFiles = function() var links = [https://fonts.googleapis.com/css?family=PT+Serif|Roboto:400,700&subset=latin-ext], headElement = document.getElementsByTagName(head)[0], linkElement, i for (i = 0 i < links.length i++) linkElement = document.createElement(link) linkElement.rel = stylesheet linkElement.href = links[i] headElement.appendChild(linkElement) var raf = requestAnimationFrame || mozRequestAnimationFrame || webkitRequestAnimationFrame || msRequestAnimationFrame if (raf) raf(loadCSSFiles) else window.addEventListener(load, loadCSSFiles) Expand I am sorry but what this is for? Its just a simple way to defer Google Fonts and accelerate content loading (so that you read the content way before the Google Fonts kicks in). It may seem a little bit awkward but it does the job and by increasing your PageSpeed score to the top. The load css async settings almost does the same exact way. Is there any specific reason to use this one I missed? Well, its not exactly the same: in the plugin, the option defers loading of all CSS. In the present case, its specifically does it for Google Fonts and since most are using those, I think it ought to be checked. What Im talking about is related to improve the font loading. Here an excellent blog post: https://www.zachleat.com/web/comprehensive-webfonts/ Thanks, will check. Thank you!



LiteCache Rush: Speed comes from using less, not from doing it faster



Reference