3 ms·
- HTML can be streamed and rendered ad-hoc in the browser. - If you don't stream HTML directly, you can use the streaming API (browser native). - If you use o
by dgb23 5y ago
- HTML can be streamed and rendered ad-hoc in the browser.
- If you don't stream HTML directly, you can use the streaming API (browser native).
- If you use one of the above techniques you can show a progress bar on top of it.
- Alternatively count the things you fetch and drive a progress bar out of that.
- If you have a single request and one big thing you fetch (typical for backend for frontend pattern) then you might roughly know how long it should take.
- You can add some currently known quantity to your heuristic to determine estimates.
- You can alert the user with "takes longer than expected" messages and clearly communicate the implications of a reload.