A lot of ad providers use embed codes, that are based on document.write(), which can cause a lot of problems. A common solution to this problem is to load ad in an iFrame, but is not always possible to implement this (streching ads are one of the cases).
jQuery LazyLoad Ad will allow you to still embed your ads inline, but will delay their display until site was completely loaded. Even more; ads will not be loaded until actually visible on page by default.
Download module and enable it. Then navigate to admin/config/system/lazyloadad and configure jQuery selectors for your ads. Ads must be modified to work with this script. A typical AdSense embed code would look like this:
The same code, rewritter to be used will look like this:
<!-- google_ad_client = "pub-8333082972366661"; google_ad_slot = "9789857825"; google_ad_width = 300; google_ad_height = 250; //-->
See jQuery LazyLoad Ad docs for more info.
There are some concerns if you are allowed to use this script with Google AdSense. Please refer tofor more info.
- Maintenance status: Seeking co-maintainer(s)
- Development status: Maintenance fixes only
- Reported installs: 16 sites currently report using this module. View usage statistics.
- Downloads: 1,490
- Last modified: November 21, 2015
- Stable releases for this project are covered by the security advisory policy.
Look for the shield icon below.