1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Adsense is heavy on page loading, what's the best way to implement it for lighter page loading?

Discussion in 'Forum Management' started by Lone Wolf, Jun 4, 2015.

  1. Lone Wolf

    Lone Wolf Well-Known Member

    I was having problems with page loading and one of the issues seems to be loading adsense. I only have two adverts per page for registered users.

    One above the breadcrumb and one below the breadcrumb.

    I have two additional ads for unregistered users. One under the sidebar and one under the first post of a thread.

    I'm currently using an addon to show adsense, would it be better to use XenForo's default adsense templates?

    What's the best way to serve adsense without affecting page loading too much and also is it better to serve adsense via a subdomain or is that not allowed?
  2. RDR

    RDR Well-Known Member

    I think there's been an issue with Adsense over the past week.

    I've seen an improvement over the last 2 days or so though.

    I'm serving through DFP into the ad_ templates FWIW.
    Lone Wolf likes this.
  3. Daniel Hood

    Daniel Hood Well-Known Member

    You could make javascript load the adsense code into the page so it happens after the rest of the page is loaded.
    Lone Wolf likes this.
  4. RoldanLT

    RoldanLT Well-Known Member

    Enable defer_js which is available on mod_pagespeed or ngx_pagespeed.
    Lone Wolf likes this.
  5. Lone Wolf

    Lone Wolf Well-Known Member

    I think that's the problem. It loads last and the page jumps after it loads.

    Is it possible to load it via a subdomain so it loads concurrently?
  6. RoldanLT

    RoldanLT Well-Known Member

    Adsense is already loaded via separate domain :).
  7. Daniel Hood

    Daniel Hood Well-Known Member

    Set a minimum height of whatever size ads you're displaying on the Adsense container element.
  8. Lone Wolf

    Lone Wolf Well-Known Member

    The responsible ad is an above the breadcrumb banner ad but it's responsive so hard to know what the minimum height would be.
  9. Daniel Hood

    Daniel Hood Well-Known Member

    I'd give it the smallest amount than at least. It'll atleast reduce the page jumping.
    Lone Wolf likes this.

Share This Page