我们正在使用OpenX在多个网站上投放广告.但是如果OpenX服务器出现问题,它会阻止这些站点上的页面加载.我宁愿让网站正常失败,即加载没有广告的网页,并在可用时将其填写.
我们正在使用OpenX的single page call,我们在CSS中给出了div的显式大小,所以它们可以在没有内容的情况下被布局,但仍然加载脚本块页面加载.有没有其他最佳做法来加快OpenX的页面?
解决方法
OpenX有一些关于如何使其标签异步加载的文档:
http://docs.openx.com/ad_server/adtagguide_synchjs_implementing_async.html
http://docs.openx.com/ad_server/adtagguide_synchjs_implementing_async.html
我已经测试了,它在当前的Chrome / Firefox中运行良好.
它需要一些手动调整他们的广告代码.他们的广告代码应该如何结束的例子:
<html> <head></head> <body> Some content here. Ad goes here. <!-- Preserve space while the rest of the page loads. --> <div id="placeholderId" style="width:728px;height:90px"> <!-- Fallback mechanism to use if unable to load the script tag. --> <noscript> <iframe id="4cb4e94bd5bb6" name="4cb4e94bd5bb6" src="http://d.example.com/w/1.0/afr?auid=8&target= _blank&cb=INSERT_RANDOM_NUMBER_HERE" frameborder="0" scrolling="no" width="728" height="90"> <a href="http://d.example.com/w/1.0/rc?cs= 4cb4e94bd5bb6&cb=INSERT_RANDOM_NUMBER_HERE" target="_blank"> <img src="http://d.example.com/w/1.0/ai?auid=8&cs= 4cb4e94bd5bb6&cb=INSERT_RANDOM_NUMBER_HERE" border="0" alt=""></a></iframe> </noscript> </div> <!--Async ad request with multiple parameters.--> <script type="text/javascript"> var OX_ads = OX_ads || []; OX_ads.push({ "slot_id":"placeholderId","auid":"8","tid":"4","tg":"_blank","r":"http://redirect.clicks.to.here/landing.html","rd":"120","rm":"2","imp_beacon":"HTML for client-side impression beacon","fallback":"HTML for client-side fallback" }); </script> <!-- Fetch the Tag Library --> <script type="text/javascript" src="http://d.example.com/w/1.0/jstag"></script> Some other content here. </body> </html>