Loading the blog will seem lighter (faster) with the lazy load Adsense script, and there will be no more useless javascript produced by the Adsense ad code on your blog.
How to remove unused javaScript from google adsense to speed up
Third-party can also produce unwanted javascript, in addition to the blogger widget script bundle and Adsense script bundle. Third-party should only be used on specific pages, and the plugin script bundle should only be installed on those pages.The Google adsense ads lazy load script code speed up for blogspot/website
How to use below javaScript code for blogspot/blogger
- Login to Blogger
- Click the Template
- Then select Edit HTML
- Copy code and past on <head> tag
//<![CDATA[
var lazyloadads=false;window.addEventListener("scroll",function(){(0!=document.documentElement.scrollTop&&false===lazyloadads||0!=document.body.scrollTop&&false===lazyloadads)&&(!function( ){var e=document.createElement("script");e.type="text/javascript",e.async=true,e.src="https://pagead2.googlesyndication.com/pagead/js/adsbygoogle .js";var a=document.getElementsByTagName("script")[0];a.parentNode.insertBefore(e,a)}(),lazyloadads=true)},true);
//]]></script>
0 Comments