How to add a timeout to a javascript ad tag

N

Neil Sandow

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
 
V

VK

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.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,769
Messages
2,569,580
Members
45,054
Latest member
TrimKetoBoost

Latest Threads

Top