Repository navigation
Commit 9699109
committed
fix(browser): skip inflight prefetch for navigation, use fresh fetch
Inflight prefetches buffer the entire response body (arrayBuffer) before
resolving. For routes with slow streaming loaders (e.g., parallel sidebar
with 5.5s loader), this blocks SPA navigation for the full loader
duration even though createFromFetch can consume streams incrementally.
When an inflight prefetch exists, skip it and do a fresh fetch instead.
The fresh fetch gives createFromFetch a streaming Response for
incremental consumption. The inflight prefetch completes in the
background and populates the cache for future navigations.1 parent 6e127d4 commit 9699109
2 files changed
Lines changed: 20 additions & 37 deletions
File tree
- packages/rangojs-router/src
- __tests__
- browser
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
197 | 197 | | |
198 | 198 | | |
199 | 199 | | |
200 | | - | |
201 | | - | |
| 200 | + | |
202 | 201 | | |
203 | | - | |
| 202 | + | |
204 | 203 | | |
205 | 204 | | |
206 | | - | |
| 205 | + | |
| 206 | + | |
| 207 | + | |
207 | 208 | | |
208 | 209 | | |
209 | 210 | | |
210 | 211 | | |
211 | | - | |
212 | | - | |
213 | | - | |
| 212 | + | |
| 213 | + | |
214 | 214 | | |
215 | 215 | | |
216 | 216 | | |
| |||
220 | 220 | | |
221 | 221 | | |
222 | 222 | | |
223 | | - | |
| 223 | + | |
| 224 | + | |
224 | 225 | | |
225 | 226 | | |
226 | 227 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
196 | 196 | | |
197 | 197 | | |
198 | 198 | | |
| 199 | + | |
| 200 | + | |
| 201 | + | |
| 202 | + | |
| 203 | + | |
199 | 204 | | |
200 | | - | |
201 | | - | |
202 | | - | |
203 | | - | |
204 | | - | |
205 | | - | |
206 | | - | |
207 | | - | |
208 | | - | |
209 | | - | |
210 | | - | |
211 | | - | |
212 | | - | |
213 | | - | |
214 | | - | |
215 | | - | |
216 | | - | |
217 | | - | |
218 | | - | |
219 | | - | |
220 | | - | |
221 | | - | |
222 | | - | |
223 | | - | |
224 | | - | |
225 | | - | |
226 | | - | |
227 | | - | |
| 205 | + | |
| 206 | + | |
| 207 | + | |
| 208 | + | |
228 | 209 | | |
229 | | - | |
| 210 | + | |
| 211 | + | |
230 | 212 | | |
231 | 213 | | |
232 | 214 | | |
| |||
0 commit comments