Home › Forums › Product Support Forums › Ajax Search Pro for WordPress Support › Delay JS
This topic contains 3 replies, has 2 voices, and was last updated by Ernest Marcinko 1 year, 11 months ago.
- AuthorPosts
- April 21, 2021 at 12:26 pm #32872
Hi,
I am currently optimizing my page performance and I noticed Google isn’t that happy with a JS execution regarding your plugin.
Is there a way to delay the execution or will there be problems? I use WPRocket so I could delay it with their function if you provide further information.
Thanks,
CaioAttachments:
You must be logged in to view attached files.April 21, 2021 at 1:09 pm #32875Hi,
You can try rocket loader or similar solutions, but if your scripts are loaded in the site footer already (non-blocking), then the execution time is not noticable to users whatsoever – regardless of the measured time. Even using rocket loader the scripts are still executed, but may not show up on the measurement tool – but that does not mean it is better whatsoever, as they still need to be executed.
Best,
Personally, I would not bother with external script loaders, as WordPress has a preferred order of loading jQuery and other prerequesites, some may also have event handlers on the page load event etc.. If your page loads up nicely, is properly cached, then by the time the user starts scrolling the scripts are already executed.
Ernest Marcinko
If you like my products, don't forget to rate them on codecanyon :)
April 21, 2021 at 1:47 pm #32879Hi Ernest,
thanks for the quick reply.
Sounds good, but just to be sure: I want to optimize my site for the new Core Web Vitals and if I understand you correctly, even if I make the proposed changes there will be no change for the Core Web Vitals?
So, for example, having a Google PageSpeed score of 34 mobile and 90 on desktop will still have me ranking nicely or at least not being “punished” by Core Web Vitals?
Thanks,
CaioApril 22, 2021 at 8:52 am #32892Hi,
Core Web Vitals are metrics to help you otpimize your site. The metrics may show an improvement, but in my opinion introducing a 3rd party asset to fix something, that may not be noticable to the end user, and only the number in the metrics changes is redundant.
Best,
Definitely try it though, I might be wrong and it may actually introduce some visual improvement as well, unfortunately there are a lot of thing I don’t know yet.
Ernest Marcinko
If you like my products, don't forget to rate them on codecanyon :)
- AuthorPosts
You must be logged in to reply to this topic.