Site logo

Archived topic

Best way to handle Javascript

1 reply · Started by Purab on March 1, 2021

Viewing posts 1–2 of 2

Hi, Google's new algorithm update is around the corner; the last time it happened I lost 60% of my traffic. But this time around, I have already started preparing and fixing my site.
I heard that the new update will be about Core Web Vitals, and possibly Mobile-only indexing. While optimizing my site, https://gamzo.in, I am facing a major issue, Javascript.
Scripts are contributing to about 70% of the total page load time. These scripts are ads and analytics, and I can't get rid of them.

I want to know the best way to handle the scripts. Like can we stop them to load until a user-interaction like scroll?
If yes, how do I do it?
Sample page: https://gamzo.in/noble-esports-in-india-a-tale-of-fallacy-and-jealousy/
PS: I am a noob in web dev.

Hi there,

you can use the Flying Scripts plugin to defer the google advert scripts:

https://wordpress.org/plugins/flying-scripts/

In the Plugins settings there is a Keywords field for the scripts you want to defer. Add: adsbygoogle.js

This archived topic is closed to new replies.