Closed
Description
We already delay responses when integrity
is specified. We should do the same for opaque responses as otherwise there's a timing attack possible to more accurately figure out the size of the response due to fetch()
resolving when the response headers are in and other APIs resolving when the response body is in.
This will impact service workers' ability to stream opaque images and more importantly opaque media quickly to the document. I don't really see a way around that though.
I realized this was a problem in w3c/resource-timing#64.
Other attacks due to opaque responses: whatwg/storage#31.