Hacker News new | ask | show | jobs
by fesc 847 days ago
Yeah but once per page, which is why it is okay to disable cache as the author wanted to simulate a cold load of each of those pages.
2 comments

That's also not true? I'm navigating between pages, and it does get served from cache for all subsequent navigations.

The only case when this code gets loaded is the literally the first cold load of the entire site — and it's only used for powering live editable interactive sandboxes (surely you'd expect a in-browser development environment to require some client-side code). It doesn't block the initial rendering of the page.

What is the problem?

I think the issue isn't with the methodology (disabling cache), but rather the erroneous conclusion that the React.dev website continually requests data as somehow problematic when it's a sideeffect of disabling browser cache.

Also, FWIW, OP is one of the authors of react.dev and a member of the react core team (not that it's relevant to the objection).