Skip to content Skip to sidebar Skip to footer

Embedding Script With Timeout In Case Server Goes Down

I am looking for a way to make sure an external script file won't block the viewed page, if the server which serves it is 'down' (for example port 80 is blocked for some reason). C

Solution 1:

Perhaps it's time to start using jQuery?

Check out jQuery.ajax() info and search for timeout keyword.

UPDATE:

For this particular solution you could use getScript() to fetch and execute remote scripts.


Solution 2:

A recent post from Steve Souders analyzes this problem : Frontend - Single Point of Failure, by browsers and type of failure


Post a Comment for "Embedding Script With Timeout In Case Server Goes Down"