AdSense Lazy Load  

Paul Paul
Active Member

Just above the < / body> code, we add the JS code below.


<script type='text/javascript'>
// İlkay Gürler -
// Lazy Load AdSense
var lazyadsense=!1;window.addEventListener("scroll",function(){(0!=document.documentElement.scrollTop&&!1===lazyadsense||0!=document.body.scrollTop&&!1===lazyadsense)&&(!function(){var e=document.createElement("script");e.type="text/javascript",e.async=!0,e.src="";var a=document.getElementsByTagName("script")[0];a.parentNode.insertBefore(e,a)}(),lazyadsense=!0)},!0);

Then we delete all adsense js codes from our blog template already attached to our JS code, you can contact us via the source link for your comments and questions thanks.

Posted : 07/01/2020 1:53 pm
Paul Paul
Active Member

You can also use this as an alternative.

A code is added in each ad unit. All contain the following JS code


<script type="text/javascript">

function downloadJSAtOnload() {

var element = document.createElement("script");

element.src = "";



if (window.addEventListener)

window.addEventListener("load", downloadJSAtOnload, false);

else if (window.attachEvent)

window.attachEvent("onload", downloadJSAtOnload);

else window.onload = downloadJSAtOnload;



Posted : 07/01/2020 1:54 pm

Please Login or Register