You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/platform/webcontainers/browser-config.md
+22-5Lines changed: 22 additions & 5 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -16,23 +16,39 @@ WebContainers use a combination of browser technologies, such as [Service Worker
16
16
17
17
In some browsers, this feature is blocked by “third-party cookie” or “third-party storage” restrictions. These are legitimate restrictions when the third-party domain is an ad server or a tracking server, but in the case of WebContainers the third-party domain is where your project code runs.
18
18
19
-
## Chrome: enabling Service Workers {#chrome-service-workers}
19
+
## Chrome
20
20
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:
21
+
With Chrome's defaults, starting with version 118 or later, you should get a pretty good experience out of the box.
22
+
23
+
Read on if you run into issues or want an even smoother experience.
24
+
25
+
Previews opened in a separate tab will require you to connect them to the editor. You usually get prompted to click on a button to do that. However, you might do that more frequently than expected with Chrome's [memory saver][CHROME_MEMORY_SAVER]. To avoid it, you can add the following exception in [chrome://settings/performance](chrome://settings/performance):
26
+
27
+
```
28
+
https://stackblitz.com
29
+
```
30
+
31
+
Once done, you should see something similar to this:
32
+
33
+
<imgalt="Chrome performance settings showing the memory saver section with an exception for stackblitz.com"src="./assets/chrome-memory-saver.png"width="800" />
34
+
35
+
### Enabling Service Workers {#chrome-service-workers}
36
+
37
+
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
38
23
39
- Enable Storage partitioning
24
40
- Or add exceptions for StackBlitz projects.
25
41
26
42
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
43
28
-
### Enable Storage partitioning
44
+
####Enable Storage partitioning
29
45
30
46
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
47
32
48
<imgalt="Chrome flags showing the third-party Storage Partitioning option enabled."src="./assets/chrome-enable-sp.png"width="800" />
33
49
34
50
35
-
### Or add exceptions for Stackblitz
51
+
####Or add exceptions for Stackblitz
36
52
37
53
To allow all StackBlitz projects to use Service Workers, go to your browser’s cookie preferences, and add exceptions for the following URL patterns:
0 commit comments