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

Conversation

jdatapple
Copy link
Contributor

Summary

Adds support for session.storage for Safari 16.4 with a note about a 10MB maximum.

Test results and supporting details

See Safari 16.4 Beta Release Notes.

@github-actions github-actions bot added the data:webext 🎲 Compat data for Browser Extensions. https://developer.mozilla.org/Add-ons/WebExtensions label Feb 23, 2023
@@ -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
Collaborator

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.

@@ -372,7 +373,7 @@
"firefox_android": "mirror",
"opera": "mirror",
"safari": {
"version_added": false
"version_added": "16.4"
Copy link
Member

Choose a reason for hiding this comment

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

Does Safari support the setAccessLevel method? See https://bugzilla.mozilla.org/show_bug.cgi?id=1724754#c1 and mdn/content#24873

Copy link
Collaborator

Choose a reason for hiding this comment

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

@jdatapple are you able to confirm?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Safari does not support the setAccessLevel method.

@rebloor rebloor merged commit 2c8c438 into mdn:main Apr 12, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
data:webext 🎲 Compat data for Browser Extensions. https://developer.mozilla.org/Add-ons/WebExtensions
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants