WordPress friendly way to load script/styles via JS?
-
Hi
There have already been a few questions somewhat related to this topic, but none of them seems to be really answered. Plus there all outdated/closed.The question: Is there a WordPress friendly way to load script and styles asynchronously per JavaScript?
My problem isn’t how to do this in general but how to deal with it in WordPress since WordPress loves to have all styles/scripts registered/enqued.Usage examples: Scott Jehl and the guys Filament Group have many savvy techniques how load CSS, scripts and fonts for better perceived page performance but they all rely on having scripts/styles inline in the <head> and loading additional scripts/styles from there.
Also Google’s page speed insights proposes to inline the above-the-fold css and load the rest of the styles via a script after pageload. But even this doesn’t seem WordPress conform.
Any suggestions how to go about this are much appreciated!
The topic ‘WordPress friendly way to load script/styles via JS?’ is closed to new replies.