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

Does storage Access API applicable for other type of storages too? #3

Closed
jagadeeshaby opened this issue Jul 20, 2023 · 7 comments
Closed

Comments

@jagadeeshaby
Copy link

jagadeeshaby commented Jul 20, 2023

As of today Firefox and Safari does only support same site storage access to Local storage and Shared worker, could you confirm the same for Chrome? Chrome/edge today allow access to cross site access to shared worker and local storage.

@cfredric
Copy link
Owner

Can you clarify what you mean by "same site storage access"? Or better yet, give more detail about your use case?

Chrome does support LocalStorage and Shared Workers in same-site contexts. Chrome also supports use of LocalStorage and Shared Workers in cross-site contexts -- but you should be aware that those APIs are being partitioned as part of the Storage Partitioning project.

@jagadeeshaby
Copy link
Author

jagadeeshaby commented Jul 20, 2023

Can you clarify what you mean by "same site storage access"? Or better yet, give more detail about your use case?

In our case cookies are fine with this API, we also make use of local storage and shared worker.

basically when our app loads , it creates a shared worker for data sync use cases, so What i have observed is loading our app in site11.com and site22.com top level sites results in 2 shared workers being spun up.

Seems like this is inline with the storage access specs, but likely not implemented yet in edge//chrome? because when testing the same on these browsers i could see that shared worker and local storage shared across the top level sites.

  • Could you confirm if shared worker has access across top level sites?
  • if not do you have any alternative recommendations i should look into? having 2 shared worker running makes our whole app useless.

@cfredric
Copy link
Owner

so What i have observed is loading our app in site11.com and site22.com top level sites results in 2 shared workers being spun up.

That's correct - that's an intended consequence of the Storage Partitioning project.

Seems like this is inline with the storage access specs, but likely not implemented yet in edge//chrome?

That's not correct - unpartitioned LocalStorage and Shared Workers (and other types of DOM storage) are not part of the current Storage Access API spec. There's an open issue for this support, and I see that you recently opened a separate issue for it as well.

when testing the same on these browsers i could see that shared worker and local storage shared across the top level sites.

Hm, I'd be surprised if you're truly using unpartitioned storage, considering that Safari and Firefox have both shipped their equivalents of storage partitioning (according to the I2S). This thread also indicates that Safari and Firefox have both shipped partitioned storage too, as of mid-2020. Perhaps if you test in Firefox/Safari again you might see different behavior now?

if not do you have any alternative recommendations i should look into? having 2 shared worker running makes our whole app useless.

I would normally encourage you to open an issue on the Storage Access API spec repository, but you've already done so. In that case, I don't think there is anything for you to do other than participate in the discussion on the issue you opened.

@jagadeeshaby
Copy link
Author

There's an privacycg/storage-access#102 for this support, and I see that you recently opened a privacycg/storage-access#175 for it as well.

may be best suited for the other APi spec, but do you know Chrome is doing anything on this line to provide accesss?

Also do you happened to know any relevant enterprise policies which would help to provide the cross storage access especially for local storage and shared worker ?

@cfredric
Copy link
Owner

may be best suited for the other APi spec, but do you know Chrome is doing anything on this line to provide accesss?

Chrome engineers are participating in the discussion on the original issue, but I don't have more information to share than that.

Also do you happened to know any relevant enterprise policies which would help to provide the cross storage access especially for local storage and shared worker ?

Yes, there are two enterprise policies: https://chromeenterprise.google/policies/atomic-groups/#ThirdPartyStoragePartitioningSettings.

@jagadeeshaby
Copy link
Author

jagadeeshaby commented Jul 21, 2023

Thank you!

Third-party storage partitioning is on by default for some users as of M113

Wow, Storage partition is live already!!!

@cfredric
Copy link
Owner

I'm going to tentatively close this issue since I think I've answered your questions, but feel free to reopen or open new issues if you have more questions. Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants