Commit df142d9
authored
[Website] Fix Safari loading stale index.html after deployments (#3208)
## Summary
Safari doesn't respect `cache: 'no-cache'` the same way Chrome and
Firefox do. When fetching /index.html with no-cache, Safari would still
serve the response from its HTTP cache. This caused problems after new
Playground deployments—the stale cached index.html contained references
to assets that no longer existed on the server, breaking the site.
This PR switches to `cache: 'no-store'` in all fetch operations, which
makes Safari behave consistently with other browsers by always going to
the network without checking the HTTP cache first.
## Changes
- Replace `cache: 'no-cache'` with `cache: 'no-store'` in
`networkFirstFetch()`
- Apply the same fix to `cacheOfflineModeAssetsForCurrentRelease()` and
`fetchFresh()`
- Add detailed comment explaining the Safari-specific behavior and why
no-store is required
## Test plan
- [ ] Deploy to staging and verify Safari loads the latest version after
deployment
- [ ] Test that offline mode still works correctly in Safari
- [ ] Verify behavior is unchanged in Chrome and Firefox1 parent bc5007b commit df142d9
1 file changed
+22
-3
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
60 | 60 | | |
61 | 61 | | |
62 | 62 | | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
63 | 77 | | |
64 | | - | |
| 78 | + | |
65 | 79 | | |
66 | 80 | | |
67 | 81 | | |
| |||
108 | 122 | | |
109 | 123 | | |
110 | 124 | | |
111 | | - | |
| 125 | + | |
| 126 | + | |
| 127 | + | |
| 128 | + | |
| 129 | + | |
112 | 130 | | |
113 | 131 | | |
114 | 132 | | |
| |||
216 | 234 | | |
217 | 235 | | |
218 | 236 | | |
219 | | - | |
| 237 | + | |
| 238 | + | |
220 | 239 | | |
221 | 240 | | |
222 | 241 | | |
| |||
0 commit comments