Without Google Ads, my HTTPS webpage loads in about 500ms. With Google Ads, the same webpage takes 2-5 seconds to load. I have two banner ads (one at the top and one at the
Place the code for initiating the ad's at the bottom of the page just before the closing /body> tag
This is what I did, after noticing adsense slows down page loading/rendering:
first of all add this code to your <Body>
tag:
<body onLoad="initialize_page();">
Now, put only one adsense script code, above the <HEAD>
tag:
<script async src="//pagead2.googlesyndication.com/pagead/js/adsbygoogle.js"></script>
Remove adsense <script async src="//pagead2.googlesyndication.com/pagead/js/adsbygoogle.js"></script>
from all of your adsense code(one copy at the header is enough).
Remove all (adsbygoogle = window.adsbygoogle || []).push({});
from your adsense code from your page. We will be using them over our initialize function.
To our initialize_page() function, add this code:
function initialize_page()
{
(adsbygoogle = window.adsbygoogle || []).push({});//this is for the first adsense
(adsbygoogle = window.adsbygoogle || []).push({});//this is for the second
(adsbygoogle = window.adsbygoogle || []).push({});//this is for the third
}
This code is suitable for 3 adsense on your page. if you use only 2 or 1 adesnes, just remove (adsbygoogle = window.adsbygoogle || []).push({});
from the function respectively.