javascript - How can we keep OpenX from blocking page load? -
we're using openx serve ads on number of sites. if openx server has problems, however, blocks page loads on these sites. i'd rather have sites fail gracefully, i.e. load pages without ads , fill them in when become available.
we're using openx's single page call, , we're giving divs explicit size in css can laid out without contents, still loading script blocks page load. there other best practices speeding pages openx?
openx has documentation on how make tags load asynchronously: http://docs.openx.com/ad_server/adtagguide_synchjs_implementing_async.html
i've tested it, , works in current chrome/firefox.
it takes manual tweaking of ad code. example of how ad tags should end up:
<html> <head></head> <body> content here. ad goes here. <!-- preserve space while rest of page loads. --> <div id="placeholderid" style="width:728px;height:90px"> <!-- fallback mechanism use if unable load 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 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 client-side impression beacon", "fallback":"html client-side fallback" }); </script> <!-- fetch tag library --> <script type="text/javascript" src="http://d.example.com/w/1.0/jstag"></script> other content here. </body> </html>
Comments
Post a Comment