• Resolved Peter Westerlund

    (@peter-westerlund)


    I have created an ad sense ad and placed out the_ad_placement() on different places on the site. But it seems that every the_ad_placement() is coming with this: <script async src="//pagead2.googlesyndication.com/pagead/js/adsbygoogle.js"></script> and that’s bad since it slows down the page load to do all of these connections.

    Had higher expectations on this plugin.

Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Author Thomas Maier

    (@webzunft)

    Hi Peter,

    thanks for your feedback.

    When you open the network tab in your browser console, does it load the adsbygoogle.js multiple times? Normally, browsers would cache it and call only once. It does on my test sites.

    This is also the format suggested by AdSense. If there would be a benefit of optimizing it then I would definitely consider it.

    Thanks,
    Thomas

    Thread Starter Peter Westerlund

    (@peter-westerlund)

    But for the first time visitor it won’t be cached, right?

    Plugin Author Thomas Maier

    (@webzunft)

    I think it is also cached when the script was loaded by visiting another site with an AdSense code on it.

    Anyway, new users don‘t have anything cached in their browser from a given site since they were never there before.

    Thomas

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Avoid connect to same .JS-file several times?’ is closed to new replies.