-
Notifications
You must be signed in to change notification settings - Fork 337
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Preserve fragment in Request/Response URLs #214
Comments
Are hashes maintained through server side redirects for xhr? Or another existing API? |
Yeah, they are. I guess we should probably revert this "fetch URL" thing. 😟 |
All is well, the only problem auto deletion new Request('/url#hash') // request.url === 'http://example.org/url' (without #hash) |
If we make this change I worry about places in service worker spec where we might be relying on the hash being removed from the url. |
@jungkees @jakearchibald any thoughts on the above comment from @wanderview? |
I know we had a previous issue about removing the spec from service worker script. Maybe all that stuff is explicit, but I know we've depended on fetch spec to have certain side effects before for other things. I guess its just something to double-check. |
I guess this would expose the hashes to the fetch event where previously they were not exposed. It also creates a new requirement on Cache API to store hashes. The Cache match algorithm would also have to be updated to take into account hashes. |
Note that I argued in w3c/ServiceWorker#854 (comment) that responses never have a fragment identifier. What happens with redirects is that the fragment from the |
Fixes #214. Though only for request URLs as exposing the fragment on a response is not an accurate representation of what happens.
Removing
#hash
of URL, it prevents to use history API:The server redirect,
response.url
needed use, that correct display url in address bar.I do propose to not delete the
#hash
, it will be more convenient in practice.Request.url
andResponse.url
should be similarlyURL.href
(within#hash
)The text was updated successfully, but these errors were encountered: