-
-
Notifications
You must be signed in to change notification settings - Fork 196
Description
In a slow/restricted network where image fetches take up to 6-10 seconds, the image preload functionality fails, resulting in each page change to be accompanied by a spinning wheel.
Checking the network tab shows that despite the subsequent image already fetched by the browser, the UI will still fetch the same image on page change, causing the user to see 6 seconds of loading.
The simplified expected behavior of preloading should be that (with preload=3):
- user opens page 1
- UI fetches and serves page 1, fetching/cache-writing 2/3 in the background
- user changes to page 2
- UI serves page 2 immediately, fetching 4 in the background
Instead, what happens is:
- user opens page 1
- UI fetches and serves page 1, fetching 2/3 in the background (I think?)
- user changes to page 2
- UI fetches page 2 (again), tells user to wait, then serves page 2, fetching 4 in the background (I think?)
I'm not sure if currently LRR's preloading/img serve functionality are distinct, or if preloading must be done before any images are served at all.
(To clarify, I don't think preload works regardless of whether the network is slow or not; I think that the problem just becomes apparent in a slow network.)