Join GitHub today
GitHub is home to over 20 million developers working together to host and review code, manage projects, and build software together.
Ajax navigation on form submit does not mimic normal navigation bar behavior if there's a redirect #2785
When a form is submitted via Ajax, jQM updates the navigation bar with form's action rather than the resulting url in the case of a redirect. i.e if you post to /things and redirect to /things/1 on a successful post, the resulting page is /things/1 but the navigation bar says /things. xjjk has graciously offered a simple test case, which he will add to the comments soon.
This comment has been minimized.
This comment has been minimized.Show comment Hide comment
We can't do that. Browser's follow redirects without alerting the xhr object so we have no way of knowing if there was in fact a redirect:
 that's the next version of xhr, the current one http://www.w3.org/TR/2007/WD-XMLHttpRequest-20070618/ has the spec we're looking for. You can find it by searching for "If the response is an HTTP redirect"