Forum Moderators: open

Message Too Old, No Replies

If the 3rd party js server is down, it hangs the site

is there a way out

         

AjiNIMC

9:51 am on Sep 5, 2006 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Hi,

I am developing a js based application for other sites (like website counter) where the js runs from my server. Now the problem is that if my server goes down or become slow it effects all the other syndicated sites.

Is there a way out?

Let me put it in other words,
My Server is xyz.com
I provided a script xyz.com/script.js to 123.com. Now if 123.com is putting this code inside one of its pages say index.html. Now index.html of 123.com has code which says script src="xyz.com/script.js".

Now if xyz.com is not responding it is hanging 123.com as well. Is there a way out?

Thanks,
AjiNIMC

kaled

10:10 am on Sep 5, 2006 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



What happens if you place the code at the bottom of the <body>?

I vaguely recall someone inserted a <script> using the document object model a while back. Perhaps you could do this using the onload event.

Kaled.

trillianjedi

10:20 am on Sep 5, 2006 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



I think that's why most people will not use third-party hosted scripts, unless they're on big networks featuring lots of redundancy (AdSense is a good example - but even that's gone wrong and brought sites down with it).

If you cannot put the code at the foot of the page without breaking it, then the best way to deal with the problem is by building a redundant server network with 2 or perhaps 3 machines, preferably in different data-centers.

TJ