Remove duplicate scripts (3 posts)

  1. Joe
    Posted 9 years ago #

    I've been playing with YSlow and noticed that the plugin ads the JS include tag once for each ad on the page, so If I have 3 ads, I have 3 script tags pointing to http://pagead2.googlesyndication.com/pagead/show_ads.js, which YSlow is complaining about.

    Would it be possible to add logic to only include the script on the 1st banner?

  2. lcf
    Posted 8 years ago #

    Hmm.. instead of putting only on the 1st banner, I think it is better to put on the footer of the page.

  3. mutube
    Posted 8 years ago #

    As I understand it it's the show_ad.js code that actually generates the advert - if you only include it once you'll only get one ad.

    Or am I missing something? Thanks!

Topic Closed

This topic has been closed to new replies.

About this Topic