Open vanstyn opened 10 years ago
Suck.
It seems that the built-in JavaScript XMLHttpRequest object is hard-coded to transparently follow redirects and there is no way to stop it, or even see that it happened:
I had wanted to do this is pure javascript, but that doesn't look like it is doable because there doesn't appear to be a way to know if a redirect happened. This means the solution will have to involve the server-side one way or another. One approach might be to configure configure the server to return the uri requested in a response header, and then in javascript check to see if it matches, and if it doesn't it probably means a redirect occurred (since, amazingly the client isn't able to know the uri of its own request)... Will need to think about this...
The AutoPanel Ajax load should be able to automatically handle HTTP Redirects:
The management of the browser history is what makes this task more complicated. Currently there is a one-to-one association of hashnav path to tab, and what needs to be done is make it so that a given tab can be associated with multiple hashnav URLs, while handing all the possible edge-cases to keep the RESTful navigation system working predictably and reliably.