Closed pythagoraskitty closed 1 year ago
LGTM but suggest mentioning that this is a large performance improvement over creating a x-origin iframe and writing from there when a network request is otherwise required.
I updated both the explainer and the PR description to mention the performance improvement.
We propose adding support to write to and delete from Shared Storage via a new HTTP response header
Shared-Storage-Write
, which will be able to triggerset()
,append()
,delete()
, andclear()
operations. This will make our API surface more flexible and thereby provide greater utility to developers. Writing from headers should provide a large performance improvement over creating a cross-origin iframe and writing from there, if a network request is otherwise required.To use the
Shared-Storage-Write
response header, the corresponding HTTP request headerShared-Storage-Writable: ?1
must first be sent.We plan to support making requests with the request header
Shared-Storage-Writable: ?1
by way offetch(<url>, {sharedStorageWritable: true})
, as well as a new content/IDL attribute pairsharedstoragewritable
/sharedStorageWritable
for iframes and images.