How to Speed up Loading a Blog with Lazy Load for AdSense - KhalistaBlog -->
Skip to content Skip to sidebar Skip to footer

How to Speed up Loading a Blog with Lazy Load for AdSense

How to Speed up Loading a Blog with Lazy Load for AdSense - For those of you who use their blog as one of their income sources, they are certainly familiar with Google AdSense. Google AdSense is a Google product that is one of the reasons and attractiveness of publishers to further develop their site. Although not all of them have the same reason.

How to Speed up Loading a Blog with Lazy Load for AdSense

On the other hand AdSense is one of the contributors to loading because the ads displayed JS AdSense will reduce the loading speed of our blog even though JS AdSense already uses asynchronous, but still it will still make the blog wait longer to load. Come on, just for those of you who want to speed up loading their blog, please follow the following tips.

Speed up Loading a Blog with Lazy Load for AdSense

The way the code works is quite simple, that is, the ad will appear after we scroll the page. So AdSense JS will not appear before we scroll the site page.

These tips are intended for those of you who have installed AdSense on their blog. For those who haven't, the code that I will share can be used for other needs such as loading an external JS link.

Open Blogger >> Click the Themes menu >> Click the Edit HTML button >> Add the code below before </body> or &lt;!--</body>--&gt;&lt;/body&gt;

<script type='text/javascript'>
//<![CDATA[
// 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="https://pagead2.googlesyndication.com/pagead/js/adsbygoogle.js";var a=document.getElementsByTagName("script")[0];a.parentNode.insertBefore(e,a)}(),lazyadsense=!0)},!0);
//]]>
</script>

If not, make sure to delete all AdSense JS links that are usually installed in the AdSense ad unit code. Like this :

<script async src="//pagead2.googlesyndication.com/pagead/js/adsbygoogle.js"></script>

This code can also be combined with the JS Adblock Killer link that I shared with my post. For those of you who have done the trick, you can use this code:

<script type='text/javascript'>
//<![CDATA[
// 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="https://rawcdn.githack.com/Arlina-Design/quasar/23207858/arlinablock.js";var a=document.getElementsByTagName("script")[0];a.parentNode.insertBefore(e,a)}(),lazyadsense=!0)},!0);
//]]>
</script>

After adding click the Save theme button and finish.

Maybe you are asking, is this code safe for our AdSense?

The answer is of course safe. Because Google also suggested to speed up loading the blog as well as installing the Lazy Load Image code to speed up image loading on the site page.

And will it affect the AdSense revenue of our blog?

I don't know for this one, because I just installed it myself. Let's just see the progress, if the income is reduced maybe it really isn't our luck ... Eh, the solution is that you can revoke the code and restore it as before.

In conclusion, prioritize what you think is needed. If you want to blog faster, you can do the above tricks, but if you are still in doubt about AdSense revenue (which might be), you can just drop the intention to install it. But for me, I consider this as a new experience, what I value here is the progress "Will installing this code affect AdSense?" Well, that curiosity makes me more excited even though there are risks that need to be accepted.

That's tips that I can share this time about How to Speed ​​up Loading a Blog with Lazy Load for AdSense. Hopefully it can be useful and good luck.

3 comments for "How to Speed up Loading a Blog with Lazy Load for AdSense"

  1. Good Morning:
    Excuse me, it's been a while.
    You can share your experiences after applying the popular lazy load for adsense
    Did the income go down?
    were kept?

    ReplyDelete
  2. you can use this method is better than lay loader for Adsense and good thing is that it has no bad effect on earning
    How to Stop Adsense From making your blog speed slow

    ReplyDelete
  3. i installed the code if i was facing any problem ....

    then i know how to fuck your website ...... bc

    ReplyDelete

Provide comments relevant to the posted articles and provide critiques and suggestions for the progress of the blog