How to optimize Adsense loading to make your website faster


Load adsense after page loads

ok, somewhere up in my content I have a :

<CENTER>
<div id=”partnerbox”></div>
</CENTER>

Then towards the bottom content (before </body> ) I have:

<div id=”partnerboxloader” style=”display:block;”>{Lots of script text stuff here, unchanged from ad vendor}</div>
<script type=”text/javascript”>
var loader = document.getElementById(‘partnerboxloader’);
document.getElementById(“partnerbox”).appendChild(loader);
</script>

I actually have separate script snippets for each ad/script location, since I found that if I did it all in one large javascript nothing would render until the last one finished. By doing them separate I can make sure that my first ad location will start showing as soon as possible.

One thought on “How to optimize Adsense loading to make your website faster

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s