Answer the question
In order to leave comments, you need to log in
How to deal with JS loading optimization in Wordpress?
I'm trying to learn how to optimize. Goes with a big creak. there is little information, they rarely answer, they advise hiring someone ....
So, the resource https://gtmetrix.com writes the first item in the necessary to optimize the download speed:
639.5KiB of JavaScript is parsed during initial page load. Defer parsing JavaScript to reduce blocking of page rendering.
and then the list:
https://dl.dropboxusercontent.com/u/19954007/asks/... I
take for example, one of the files listed in the list - ..../TweenMax.min.js
I climb into the topic, I find where it connects, I see:
wp_register_script('greensock', bla-bla....TweenMax.min.js', array('greensock_easing'), null, true);
Answer the question
In order to leave comments, you need to log in
It seems to me that the point here is not where the scripts are, but the fact that they are kilometer-long (hello to twitter a couple of years ago). Still, 639.5KiB is a lot, especially for phones / tablets and mobile Internet. Perhaps some of them can be connected on demand, and not on all pages. Call some of them with scripts (use the same jQuery.getScript, for example).
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question