【发布时间】:2015-06-13 12:11:42
【问题描述】:
我有一个显示 Google Ads 的页面 - 其中三个。广告初始化如下:
<script async src="//pagead2.googlesyndication.com/pagead/js/adsbygoogle.js"></script>
<ins class="adsbygoogle class-resp" style="display:inline-block" data-ad-client="ca-pub-4283524395367264" data-ad-slot="8923673879"></ins>
<script>(adsbygoogle = window.adsbygoogle || []).push({});</script>
<ins class="adsbygoogle class-resp" style="display:inline-block" data-ad-client="ca-pub-4283524395367264" data-ad-slot="8923673879"></ins>
<script>(adsbygoogle = window.adsbygoogle || []).push({});</script>
<ins class="adsbygoogle class-resp" style="display:inline-block" data-ad-client="ca-pub-4283524395367264" data-ad-slot="8923673879"></ins>
<script>(adsbygoogle = window.adsbygoogle || []).push({});</script>
问题在于页面大小大得离谱,原因主要是每个广告似乎都需要自己下载以下每个脚本,即每个脚本都下载了 3 次,每次页面加载增加了大约 700kb (这对于移动浏览来说太大了)
http://pagead2.googlesyndication.com/pagead/js/r20150402/r20150224/show_ads_impl.js http://pagead2.googlesyndication.com/pagead/js/r20150402/r20150224/expansion_embed.js http://pagead2.googlesyndication.com/pagead/js/r20150402/r20110914/abg.js
有没有人知道强制三个广告共享上述三个脚本的单个下载的方法,或者每个广告都必须下载各自的副本??
【问题讨论】:
标签: javascript adsense google-ads-api