[whatwg/fetch] Please add support for an indicator as to whether the page was resolved via a temporary redirect or a permanent one (#892)

Use case:
I have a browser app that stores URLs (bookmarks or whatever). From time to time URLs get redirected, either permanently or temporarily.

It would be helpful to update the stored URLs as and when they are permanently redirected, as

- the original URL may go out of service
- every time I subsequently use the original URL it will result in one or more extra requests to fetch the web page.

I can tell (in general) that the request has been redirected because the responseURL field will not be the same as the URL I used in the open. However, there's currently no way I can determine if that was due to a temporary redirect or a permanent one. And if the redirect is temporary I do not want to update my stored URL because when the redirect goes away, the URL will be wrong.

Therefore a single (read only) field in the request which is filled in on a successful request indicating the url was changed due to a temporary redirect would be extremely helpful.

I think it might also improve users experience if those browsers that displayed the target URL in the address bar took notice of this, as taking a bookmark on a URL generated as the result of a temporary redirect would potentially have unhelpful results.

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/whatwg/fetch/issues/892

Received on Monday, 8 April 2019 08:15:00 UTC