Hacker News new | ask | show | jobs
by nicoburns 2209 days ago
> Gatsby can pre-emptively fetch all the linked pages, both React components and data, to give instantaneous second click page loads. That's a pretty impressive feature in the wild, the second click is neck snappingly fast.

Can't you do that much more simply with a simple static site and a service worker?

1 comments

You don't even need the service worker: just use preload hints for the related content and, if you're really convinced you need to, fetch the content so you can replace the page on a click.

That's usually a waste of time, however, compared to making sure your site is cache-friendly. As most projects have discovered, there are a lot of edge cases for making a JavaScript solution as fast or robust as the built-in browser behaviour.