Is it good idea to load adsbygoogle.js (Google AdSense Code) in Header?


When placing ads on our Blog, we have to place this code // multiple times. so it is good to place this code in header once? so that we don’t have to use that code multiple time. Will it help in our Page Speed Goal?


Well, there is no need to include that script everytime.

Just use it once in the header.


Just remove it from the ad code.


Add that code in your Footer only one time for all ads.


Add it into the header is okay?


You are delaying your page load.


But it’s worth for the AdSense revenue. Because if you include in the footer, you will see less revenue to slow loading of AdSense. Visitor can wait few ms, advt can load async way. So, there is no slow load time.


But I have never faced this brother.


May be… but loading before </head> seems ideal way.


@GulshanKumar , Sir you’re 100 % Right
If the code can used in footer, then Google obviously tell us to do that or it can a option in adsense home page.
Buy Google says to paste the code in between <head> here </head>
So as Google’s guidelines you should follow it.


Loading in head direct browser to give top most priority compared to having in the footer. Script are executed early, thanks to asynchronous method it’s non-render blocking. So, we shouldn’t hesitate keeping in the header. While in footer it may cause delay in showing Advt.


Thank You Guys. I have been using the code in header.