HighDots Forums  

How to add a timeout to a javascript ad tag

Javascript JavaScript language (comp.lang.javascript)


Discuss How to add a timeout to a javascript ad tag in the Javascript forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
Neil Sandow
 
Posts: n/a

Default How to add a timeout to a javascript ad tag - 09-20-2003 , 12:12 PM






My web site with servers located on the West Coast runs ads served by an
adserver on the East Coast. A not-infrequent problem occurs when a
user on the West Coast tries to load a page but for whatever reason
can't reach the adserver. It causes a portion or the entire page to
hang until the request times out. This can take up to 30 seconds or
more. Is there a way to set up a time frame which will drop the
request or route it to a local default file under these circumstances?

Thanks! -Neil


Reply With Quote
  #2  
Old   
VK
 
Posts: n/a

Default Re: How to add a timeout to a javascript ad tag - 09-20-2003 , 04:54 PM






Do it from the opposite direction, it's the common way:

1. First load a local page somepage.html
The best is to create just blank page with the bgColor of the main page, so
it doesn't waste visitor's attention untill all is done.

2. Now you can attach onLoad="this.src='blah-blah-blah-_on_another_server';"
to the iframe.

Neil Sandow <rx (AT) rxlist (DOT) com> wrote

Quote:
My web site with servers located on the West Coast runs ads served by an
adserver on the East Coast. A not-infrequent problem occurs when a
user on the West Coast tries to load a page but for whatever reason
can't reach the adserver. It causes a portion or the entire page to
hang until the request times out. This can take up to 30 seconds or
more. Is there a way to set up a time frame which will drop the
request or route it to a local default file under these circumstances?

Thanks! -Neil






Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.