MY site hosted on Digitalocean, without ads it’s loads in just seconds as google speed test.
FCP 2.4 FID 190 ms Rating 73 But with ads, it’s too much slow rating only 48
I am using a wp-rocket cache plugin, maybe there is a reason.
This textbox defaults to using Markdown to format your answer.
You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!
Accepted Answer
Hello,
I’ve been noticing a similar problem with a few of my websites as well.
Having this in mind you could try to set a delay for the Google Ads script so that it loads your ads let’s say 5 or 10 seconds after your website content has loaded. That way it would not slow down the initial loading time, and the ads would show up a few seconds later.
You could do that by following the steps here:
https://wpfixit.com/super-slow-google-ad-script/
Basically what you need to do is to change the standard Google Ads script:
<script async src="//pagead2.googlesyndication.com/pagead/js/adsbygoogle.js"></script>
<ins class="adsbygoogle"
style="display:inline-block;width:728px;height:90px"
data-ad-client="ca-pub-UNIQUE_ACCOUNT#"
data-ad-slot="UNIQUE_AD#"></ins>
<script>
(adsbygoogle = window.adsbygoogle || []).push({});
</script>
To the following:
<ins class="adsbygoogle"
style="display:inline-block;width:728px;height:90px"
data-ad-client="ca-pub-UNIQUE_ACCOUNT#"
data-ad-slot="UNIQUE_AD#"></ins>
<script type='text/javascript'>
(function() {
var done = false;
var script = document.createElement('script');
script.async = true;
script.type = 'text/javascript';
script.src = '//pagead2.googlesyndication.com/pagead/js/adsbygoogle.js';
var createScript = setTimeout(
function(){
document.getElementsByTagName('HEAD').item(0).appendChild(script);
}, 5000
);
script.onreadystatechange = script.onload = function(e) {
if (!done && (!this.readyState || this.readyState == 'loaded' || this.readyState == 'complete')) {
(adsbygoogle = window.adsbygoogle || []).push({});
}
};
})();
</script>
Regards, Bobby
Get paid to write technical tutorials and select a tech-focused charity to receive a matching donation.
Full documentation for every DigitalOcean product.
The Wave has everything you need to know about building a business, from raising funding to marketing your product.
Stay up to date by signing up for DigitalOcean’s Infrastructure as a Newsletter.
New accounts only. By submitting your email you agree to our Privacy Policy
Scale up as you grow — whether you're running one virtual machine or ten thousand.
Sign up and get $200 in credit for your first 60 days with DigitalOcean.*
*This promotional offer applies to new accounts only.