Re: [whatwg/fetch] Consider changing Response's url so it includes a fragment (#1167)

RafaelKr left a comment (whatwg/fetch#1167)

> The `Location` header is a completely separate topic, so I'm going to be marking your comment as off-topic as well. That issue is also too long to understand in a reasonable amount of time. I suspect you need at least [#601](https://github.com/whatwg/fetch/issues/601) though. If you think you need more, please file a dedicated issue with a clear description.

I try to clarify what stof is talking about:
1. Turbo uses `fetch` to make a Request to the server
2. The server responds with a redirect (3XX) and a Location header including a fragment (e.g. `Location: /path#anchor`)
3. Turbo redirects to `/path`, as there is no way to get the fragment (`#anchor`)

So adding a new property, e.g. `Response.prototype.hash` like @annevk proposed in https://github.com/whatwg/fetch/issues/1167#issuecomment-2830134900, should make it possible to fix it in future Turbo versions in a backwards compatible manner. But probably there is no way to fix it for the current version of Turbo as this would require to change `Response.prototype.url`, possibly breaking other code, as @annevk also stated in that linked comment.

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

Message ID: <whatwg/fetch/issues/1167/2886580372@github.com>

Received on Friday, 16 May 2025 12:27:17 UTC