lib/assets/javascripts/unpoly/protocol.coffee in unpoly-rails-0.51.1 vs lib/assets/javascripts/unpoly/protocol.coffee in unpoly-rails-0.52.0
- old
+ new
@@ -20,18 +20,16 @@
[Ruby bindings](https://github.com/unpoly/unpoly/blob/master/README_RAILS.md)
in your controllers and views. If your server-side app uses another language
or framework, you should be able to implement the protocol in a very short time.
-\#\#\# Redirect detection
+\#\#\# Redirect detection for IE11
-Unpoly requires an additional response header to detect redirects, which are
-otherwise undetectable for any AJAX client.
+On Internet Explorer 11, Unpoly cannot detect the final URL after a redirect.
+You can fix this edge case by delivering an additional HTTP header
+with the *last* response in a series of redirects:
-After the form's action performs a redirect, the next response should include the new
-URL in the HTTP headers:
-
```http
X-Up-Location: /current-url
```
The **simplest implementation** is to set these headers for every request.
@@ -177,10 +175,10 @@
###*
@function up.protocol.locationFromXhr
@internal
###
locationFromXhr = (xhr) ->
- xhr.getResponseHeader(config.locationHeader)
+ xhr.getResponseHeader(config.locationHeader) || xhr.responseURL
###*
@function up.protocol.titleFromXhr
@internal
###