1,105,242 Community Members

Google AdSense async code

Member Avatar
Dani
The Queen of DaniWeb
20,551 posts since Feb 2002
Reputation Points: 1,356 [?]
Q&As Helped to Solve: 927 [?]
Skill Endorsements: 203 [?]
Administrator
Featured
Sponsor
 
1
 

It's here, here at last! Only about a decade too late, and about six or seven years after Google announced they were working on it.

AdSense now offers asynchronous code, finally. It looks something like this:

<script async src="http://pagead2.googlesyndication.com/pagead/js/adsbygoogle.js"></script>
<ins class="adsbygoogle"
     style="display:inline-block;width:728px;height:90px"
     data-ad-client="ca-pub-xxxxxx"
     data-ad-slot="xxxxxx"></ins>
<script>
(adsbygoogle = window.adsbygoogle || []).push({});
</script>

Asynchronous code is non-page blocking, meaning it doesn't slow down the rendering of the page, and only loads the ads after the rest of the page has already finished loading.

LastMitch
Deleted Member
 
0
 

Asynchronous code is non-page blocking, meaning it doesn't slow down the rendering of the page, and only loads the ads after the rest of the page has already finished loading

I actually do have a google adsense account but never really used it to make money. I might try that since you provided a code and explanation. Not sure how it works but I'll learn it. Thanks for sharing.

Member Avatar
zardari
Newbie Poster
1 post since Jul 2013
Reputation Points: 0 [?]
Q&As Helped to Solve: 0 [?]
Skill Endorsements: 0 [?]
 
0
 

thanks

You
This article has been dead for over three months: Start a new discussion instead
Post:
Start New Discussion
View similar articles that have also been tagged: