We have about 120 SSG pages in our application which isn't too much data to transfer over the network. It would be nice to add all SSG JSON data to the service worker so every page is cached automatically.
It might be interesting to introduce some limits as how much it should be able to cache here, for example, we only the x-first pages of getStaticPaths for a page for example.
Help me understand the request here, what is SSG page?
My guess is setting expiration.maxEntries in runtimeCaching would help:
https://developers.google.com/web/tools/workbox/reference-docs/latest/module-workbox-expiration.ExpirationPlugin#ExpirationPlugin
Static Site Generation (SSG), the new big feature in 9.3.
The idea would be to proactively cache all the generated page data.
@paales I use the SSG mode with NextJS 9.3, all working good for me, you can confirme that?
I don't believe SSG pages are prefetched, there only is runtime caching. The issue is about prefetching those pages :)
Most helpful comment
I don't believe SSG pages are prefetched, there only is runtime caching. The issue is about prefetching those pages :)