Asynchronous Code Adsense For Faster Page Loading

Asynchronous Code Adsense For Faster Page Loading

Visitors who for too long waiting for the loading of the page, will certainly feel bored and impatient, and it could be finally leaving our blog before reading it. Therefore, the speed of loading or pageviews of the blog became a very important thing.

Blogs are lightweight, fast loading will give surfing experience for visitors to the blog, so as to make at home and want to come back again. Of course if it is supported by a good article content.


Well, the one that often makes the loading page of our blog to be slow is the script of the ad from Adsense. AdSense itself provides two kinds of scripts that we can use, namely: Synchronous and Asynchronous

http://googleadslab.blogspot.com/

The difference of the two is, if the code in sync when loaded, then the script will wait was over loaded, and if by chance there was something that made him slow, then display the whole page will be slow, because it must wait for the adsense script is included.

Whereas, the asynchronous code, allows the page to be loaded without having to wait for the script to finish loading completely, eventually loading the page will be getting faster and faster.

This is the difference of code in sync:

<script type=”text/javascript”>
<!– google_ad_client = “ca-pub-2952107xxxxxxx”;
google_ad_slot = “92283xxxxx”;
google_ad_width = 468;
google_ad_height = 60;
//–>
</script>
<script type=”text/javascript”
src=”http://pagead2.googlesyndication.com/pagead/show_ads.js”>
</script>

with the asynchronous:

<script async src=”http://pagead2.googlesyndication.com/pagead/js/adsbygoogle.js”></script>
<ins class=”adsbygoogle”
     style=”display:inline-block;width:468px;height:60px”
     data-ad-client=”ca-pub-2952107xxxxxxx”
     data-ad-slot=”92283xxxxx”></ins>
<script>
(adsbygoogle = window.adsbygoogle || []).push({});
</script>

Therefore, I suggest to use this asynchronous code in order to display our blog faster. To remember is, you have to replace all the adsense script in the blog, feel there is a significant increase in the speed of page views, especially for mobile display with a connection that "mediocre".

However, Google itself says that the asynchronous code is still beta, so that if there is a problem, please change into the more common synchronous code.

With the look of the blog faster, are expected to improve the performance of adsense ads itself, so that the edges can increase revenue.

Hopefully useful, a success for us all.

Update: the current asynchronous code is no longer a beta, and is the default suggested by Google Adsense.

Greetings.

No comments:

Post a Comment

Copyright © Google Adsense Lab. All rights reserved. Blogging Tools: GT Metrix - Small Seo Tools - Parse HTML - Feedburner - Alexa - Google Richsnippets - Facebook Debug