Re: Link traversal failure with <load/>

It depends on how browsers do it. In this fairly old SO question [1],
somebody says:

> Not really possible, because when window.location = someURL is executed,
before the URL is even tested, your document is removed from the window.
You have no code remaining that could test if it worked.
> If the link is on the same origin, you may issue an XMLHttpRequest to
test if the page is reachable but there doesn't seem to be a way to test if
a page isn't requestable just due to cross origin request or because the
URL is wrong.
> For a general document, I don't know any way to test if a foreign origin
page is reachable (but it can be done for an image using the onload event

If it is indeed true that in the case of an external, not same-origin URL
the document is unloaded before the error is known, then there will be at
least some situations where nothing can be done. In some other cases, like
navigation within the same app or when accessing same-origin documents,
then more could be done.



On Tue, Oct 31, 2017 at 7:28 AM, Steven Pemberton <>

> "The link indicated by the URI is traversed. If traversal fails, then an
> implementation-specific means of conveying the link traversal failure
> occurs."
> We may have discussed this before, but I've just hit it.
> Is there really nothing better that we can do than this?
> Clicking on a 'link' just does nothing. It would be really nice to have
> something like xforms-submit-error that at least tells you what's wrong...
> Steven

Received on Tuesday, 31 October 2017 16:09:37 UTC