Re: [whatwg/fetch] Header to opt out of opaque redirect (#601)

We also have a use case for this in service workers - we would like to `fetch` a request and see if it was redirected and to where, then we clear any cache for where the browser will be redirected to before the service worker fetches that page and potentially returns with a cached / stale content. This is particulary important in a stale-while-revalidate strategy.

Our particular flow is:

1. POST request
2. Server validates request and responds with a 301 Redirect with any errors / success message
3. The `Location` redirect returned from the server should have it's cached cleared by the service worker, so that when the page is loaded by the server worker it won't show stale content.

Maybe I'm approaching this the wrong way though as I'm kinda confused what even is a `opaqueredirect` and why it's useful.

-- 
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/601#issuecomment-518891291

Received on Wednesday, 7 August 2019 00:24:17 UTC