Skip to content
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

Add session.storage support for Safari 16.4 #18997

Merged
merged 4 commits into from
Apr 12, 2023
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion webextensions/api/storage.json
Original file line number Diff line number Diff line change
Expand Up @@ -372,7 +372,8 @@
"firefox_android": "mirror",
"opera": "mirror",
"safari": {
"version_added": false
"version_added": "16.4",
"notes": "Maximum allowed storage is 10MB."
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@jdatapple I don't seem to be able to find any Apple documentation that confirms this. The information on Review your web extension API usage seems to suggest that unlimited grants unlimited storage.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The storage.session API is distinct from the storage.local (and storage.sync and storage.managed) APIs. They have different storage backends and different quotas.

Safari has shipped, with 10 MB as a quota. This is noteworthy because the only other implementation (Chromium) used to have 1 MB as a limit.

Recently, there was consensus among browsers to bump the limit from 1 MB to 10 MB: w3c/webextensions#350

So I suggest the following:

  • Remove the notes from Safari.
  • Modify the chrome support to note that before 112, the limit was 1 MB. (starting from Chrome 112, the limit is 10 MB).

Update mdn/content at https://developer.mozilla.org/en-US/docs/Mozilla/Add-ons/WebExtensions/API/storage/session to correct the statement about the quota (it currently states 1 MB).

Reference for Chrome bug that bumped the limit to 10 MB:
https://bugs.chromium.org/p/chromium/issues/detail?id=1385167

Copy link
Contributor Author

@jdatapple jdatapple Feb 24, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I made the note changes in 582a0ad.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I also submitted a PR for the content changes on MDN. See #24853.

},
"safari_ios": "mirror"
}
Expand Down