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 <!--</body>--></body>
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.
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 <!--</body>--></body>
<script type='text/javascript'>If not, make sure to delete all AdSense JS links that are usually installed in the AdSense ad unit code. Like this :
//<![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>
- <script async src="//pagead2.googlesyndication.com/pagead/js/adsbygoogle.js"></script>
<script type='text/javascript'>After adding click the Save theme button and finish.
//<![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>
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.