Skip to content

Commit a8fe069

Browse files
authored
chore: service workers blocked if storage partitioning is not enabled (#206)
1 parent 3f9a3ac commit a8fe069

File tree

2 files changed

+17
-2
lines changed

2 files changed

+17
-2
lines changed
40.9 KB
Loading

docs/platform/webcontainers/browser-config.md

Lines changed: 17 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,21 @@ In some browsers, this feature is blocked by “third-party cookie” or “thir
1818

1919
## Chrome: enabling Service Workers {#chrome-service-workers}
2020

21-
If you use the “Block Third Party Cookies” option in Chrome, you will need to add exceptions for StackBlitz projects.
21+
If you use the “Block Third Party Cookies” option in Chrome and you have "Third-party Storage Partitioning" disabled, you will need to either:
22+
23+
- Enable Storage partitioning
24+
- Or add exceptions for StackBlitz projects.
25+
26+
The first option should be preferred because this is a [new feature][GOOGLE_SP] of Chrome which improves your privacy when you visit websites that embed third-party sites.
27+
28+
### Enable Storage partitioning
29+
30+
Visit `chrome://flags/#third-party-storage-partitioning` and choose `Enabled` in the drop down. In recent version of Chrome, choosing the `Default` value should work too.
31+
32+
<img alt="Chrome flags showing the third-party Storage Partitioning option enabled." src="./assets/chrome-enable-sp.png" width="800" />
33+
34+
35+
### Or add exceptions for Stackblitz
2236

2337
To allow all StackBlitz projects to use Service Workers, go to your browser’s cookie preferences, and add exceptions for the following URL patterns:
2438

@@ -62,7 +76,7 @@ You can work around this issue in a couple ways:
6276
1. Use the “Strict” mode instead of “Custom” mode. It’s important to note that it's slightly more permissive than “Custom” mode with very strict options. If this is not something you'd like to allow, you can...
6377
2. Add exceptions to cookie blocking for the domains used to run StackBlitz projects.
6478

65-
To do so, visit `about:preferences#privacy` to check what your current settings look like.
79+
To do so, visit `about:preferences#privacy` to check what your current settings look like.
6680

6781
<img
6882
alt="The Firefox “Privacy & Security” settings page showing that Enhanced Tracking Protection is set to “Custom”, and to “Cookies: All cross-site cookies (may cause websites to break)”."
@@ -129,3 +143,4 @@ stackblitz.com
129143

130144
[MDN_SERVICE_WORKER]: https://developer.mozilla.org/en-US/docs/Web/API/Service_Worker_API
131145
[MDN_WEB_ASSEMBLY]: https://developer.mozilla.org/en-US/docs/WebAssembly
146+
[GOOGLE_SP]: https://developers.google.com/privacy-sandbox/3pcd/storage-partitioning

0 commit comments

Comments
 (0)