AdSense Ads Late Loading and Resolution

AdSense Ads Late Loading and Resolution

AdSense Ads Late Loading and Resolution - Blog pages One of the reasons for late loading is AdSense ads. The reason is that when you add a JavaScript AdSense code to each ad unit on your blog pages, it will cause more than one JavaScript to be loaded. 
In this case, it will cause your blog pages to load late and increase the number of queries on your blog.

In order for your blog pages to load faster, you can make all the Adsense codes you add to your blog work with a single javaScript code and work without any effect on the loading of your blog pages.


Alert:
Do not apply for Adsense ads located at the top of your blog pages. When your blog visitors drag down the loaded page, Adsense ads at the bottom of your pages will be loaded.

How to Add in Blog Theme

Now to apply this tip on your blog, add the following JavaScript code one line above the </body> code found on your blog's template codes page and save the template.

<script>
//<![CDATA[
var lazyadsense=false;window.addEventListener("scroll",function(){if((document.documentElement.scrollTop!=0&&lazyadsense===false)||(document.body.scrollTop!=0&&amp) ;lazyadsense===false)){(function(){var name=document.createElement('script');ad.type='text/javascript';ad.async=true;ad.src='https:/ /pagead2.googlesyndication.com/pagead/js/adsbygoogle.js';var sc=document.getElementsByTagName('script')[0];sc.parentNode.insertBefore(ad,sc);})();lazyadsense=true ;}},true)
//]]>
</script>

Examine the JavaScript Adsense codes on your blog. Remove the JavaScript codes specified in the example Adsense code below (for ad units in the footer of your blog pages) and save.

<script async src='//pagead2.googlesyndication.com/pagead/js/adsbygoogle.js '></script>
<ins class="adsbygoogle"
     style="display:block"
     data-ad-client="ca-pub-0000000000000000"
     data-ad-slot="0000000000"
     data-ad-format="auto"></ins>
<script>
(adsbygoogle = window.adsbygoogle || []).push({});
</script>

Conclusion

In this article, we have shared tips about JavaScript Adsense codes for faster loading of blog pages. You can leave a comment for your comments and questions about the broadcast.
Next Post Previous Post
No Comment
Add Comment
comment url