开发者

With a 3rd party Open X Server, how can we stop it from attempting to load if their site goes down?

The code below is the ad that is being served. Since the ad is at the very top of the page, we want to make sure that it doesn't stop the site from loading if their server happens to go down. We are looking for either a javascript or C# ASP.NET solution. We have tried rewriting it to work on DOM Ready, but it does not seem to work that way.

<!--LEADERBOARD AD-->
    <center>
    <div>
    <script type='text/javascript'><!--        //<![CDATA[
        var m3_u = (location.protocol == 'https:' ? 'https://www.oncampusweb.com/delivery/ajs.php' : 'http://www.oncampusweb.com/delivery/ajs.php');
        var m3_r = Math.floor(Math.random() * 99999999999);
        if (!do开发者_高级运维cument.MAX_used) document.MAX_used = ',';
        document.write("<scr" + "ipt type='text/javascript' src='" + m3_u);
        document.write("?zoneid=341");
        document.write('&amp;cb=' + m3_r);
        if (document.MAX_used != ',') document.write("&amp;exclude=" + document.MAX_used);
        document.write(document.charset ? '&amp;charset=' + document.charset : (document.characterSet ? '&amp;charset=' + document.characterSet : ''));
        document.write("&amp;loc=" + escape(window.location));
        if (document.referrer) document.write("&amp;referer=" + escape(document.referrer));
        if (document.context) document.write("&context=" + escape(document.context));
        if (document.mmm_fo) document.write("&amp;mmm_fo=1");
        document.write("'><\/scr" + "ipt>");
    //]]>--></script><noscript><a href='http://www.oncampusweb.com/delivery/ck.php?n=ae7029e9&amp;cb=INSERT_RANDOM_NUMBER_HERE' target='_blank'><img src='http://www.oncampusweb.com/delivery/avw.php?zoneid=341&amp;cb=INSERT_RANDOM_NUMBER_HERE&amp;n=ae7029e9' border='0' alt='' /></a></noscript>
    </div>
    </center>
    <!--LEADERBOARD AD-->


I vaguely remember facing a similar problem I had a few years ago. What I had to do was load the ad in the footer. That way, your page will always load. Of course, the downside is that it won't display until the page is fully loaded.


Simply just created a bit in our SQL server that could be flipped if the site was failing to load. This would stop the site from trying to load the ad at all.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜