HTTP redirect fallback
Posted
by Ondrej Stastny
on Stack Overflow
See other posts from Stack Overflow
or by Ondrej Stastny
Published on 2010-05-01T11:16:34Z
Indexed on
2010/05/01
11:27 UTC
Read the original article
Hit count: 397
http
|JavaScript
Hi,
Is there a way to provide fallback URL when HTTP redirect times out? What I'm trying to achieve is that when I hit the original url, I would respond with HTTP redirect (300, 307?) giving the browser new URL and the fallback URL in case the new URL times out?
I was also considering doing this client side but it just does not seem to be very effective (in terms of speed, client support). What I would do is probably have a tiny 1x1px image on each server, try loading it and then check with javascript which server is up and redirect there.
Any other ideas? Thanks
© Stack Overflow or respective owner