fetch icon indicating copy to clipboard operation
fetch copied to clipboard

Consider changing Response's url so it includes a fragment

Open annevk opened this issue 4 years ago • 14 comments

I initially bundled this with #505 and I now think that was a mistake. We should consider this separately. We also don't need to change XMLHttpRequest's responseURL as that's a legacy API. An obvious alternative here would be to introduce a separate getter for the propagated fragment if we deem it too risky.

Not exposing this prevents correct usage of fragments in userland. (I'm not sure there is much of that as we haven't seen any complaints to date, but it seems consistent with the extensible web principles to give userland the same capabilities the browser has.)

I will adjust https://github.com/web-platform-tests/wpt/pull/7261 per our decision.

cc @wanderview @yutakahirano @KershawChang @youennf @domenic @jasnell

annevk avatar Feb 11 '21 08:02 annevk

I feel like I have seen a couple developer complaints over the years, but I don't have references handy.

wanderview avatar Feb 11 '21 14:02 wanderview

I don't have a strong opinion. I would like to maintain my previous position,

I guess that not many pages will be broken. Assuming that, if other browser vendors are fine with the idea I can change the behavior.

yutakahirano avatar Feb 12 '21 13:02 yutakahirano

See https://github.com/hotwired/turbo/issues/825 and https://github.com/hotwired/turbo/issues/211 for reports in @hotwired/turbo that are direct results of this limitation as Turbo cannot know that the final URL being loaded has a fragment.

stof avatar Jan 31 '23 16:01 stof