4

I have been working on lots of performance updates to my site and I have gotten pretty much every page type to load in under 2 seconds. Most single post pages are coming in at around 1.5 seconds.When I enable adsense, it takes 3-4 seconds for the page to load.

I did a test on a live page using gtmetrix and the final asset from my domain finishes loading at 1.6 seconds. Adsbygoogle then continues to hang up the page until it finishes loading at 3.4s.

Compared to some sites, 3.4 seconds is not the worst, but it annoying that adsense is doubling the time it takes for pages to load on my site. To make it worse, I am only displaying one single ad.

I know google are funny about altering results for their crawlers. Does google consider adsense part of this content too or can I write some code that will disable adsense ads when the crawler comes in order to get the best possible ranking bonus for a fast loading page

1
  • No idea, but remembering that Google penalizes or boosts sites based on loading speed, it sounds dodgy. Commented Nov 28, 2019 at 16:52

1 Answer 1

3

I had the same issue and I could not come up with any solution that could prevent that script and may be others from loading when Googlebot is crawling the page.

What I did though, and it is working nicely for me - not sure if there is a better way but this worker for me and I believe is totally valid and makes sense - was to control the load of that script based on the cookies acceptance of the actual site which makes sense because you shouldn't track or show ads if you don't have the consent of the user, I think. Anyway, because the Googlebot "does not accept/declines" any cookie, the scripts weren't loading and my score went up.

2
  • That's a really cool solution.
    – Chris
    Commented Aug 19, 2022 at 19:33
  • Thanks! :) Hope it helps! Commented Aug 24, 2022 at 9:41

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.