Techagesite
Techagesite

Reputation: 475

Do the same scripts only load once?

If i have 2 google ads on a page with this script

<script type="text/javascript">
(adsbygoogle = window.adsbygoogle || []).push({});
      </script>

Will it only get loaded once for the 2 ads or once each script?

Upvotes: 0

Views: 60

Answers (1)

Parv Sharma
Parv Sharma

Reputation: 12705

see it as this

(adsbygoogle = window.adsbygoogle || []).push({});

if variable adsbygoogle is already present then it will be taken from window.adsbygoogle else window.adsbygoogle will be initialized as a new array[]

then a new object {} will be pushed into that array

Upvotes: 1

Related Questions