3 ms·
I could see this being used in a "pre-fetch" manner for single-page applications. For example, preparing and rendering the next page or component before the use
by EB66 8y ago
I could see this being used in a "pre-fetch" manner for single-page applications. For example, preparing and rendering the next page or component before the user has opened it. So when the user does click to open the next page or component, it can be displayed immediately.
The ability to perform that rendering in the background without blocking the main thread would offer some real value.
- OutThisLife 8y agohttps://github.com/guess-js/guess https://github.com/guess-js/guess
- codedokode 8y agoBut this will consume CPU and RAM and will make the page user is browsing work slower. Especially for users with low-end hardware. If you use server-side rendering (for example, if you use PHP on your server) then you won't need all of this and pages will load instantly without any complicated preloading.
- EB66 8y ago> But this will consume CPU and RAM and will make the page user is browsing work slower. Not necessarily -- Web Workers enable you to take advantage multiple CPU cores. You could, potentially, offload some of the rendering work to a CPU core that would otherwise go unused. But I agree, if you went to the extreme case, pre-rendered everything the user could click on and utilized all CPU cores, then you'd definitely create a performance problem for yourself.