4

How could one utilise both SSR and offline first capabilities and merge the two technologies together?

SSR is capable of rendering my javascript templates for faster, flickerless loading of an application and most importantly would enable any page to be SEO and NOjavascript friendly which is important for search engines, social networks crawling our sites and provide better page accessibility.

Offline first service workers would enable me to store a shell of my application and perhaps also some page content too.

With an app shell architecture I believe you would want your server to serve a simple index.html file that could be easily cached once by a service worker. However with SSR you are serving a dynamically rendered page that changes depending what the route happens to be so you would end up caching every single page!

Jammer
  • 1,548
  • 20
  • 37

1 Answers1

0

I'm having the same dilema ritgh now. I haven't start to develop anything yet, but I did some research to find some clue, and found this article, is still general, but there are examples for react and virtual dom pwas, the key there is the pokedex (virtual dom) example.

enter image description here

AS you can see, they used a web worker (not actually needed by a pwa because is different from a service worker). For now, I can't tell you anymore than this, you should definetly read the post about pokedex, and inspect the source code and maybe try the webworker approach.

Community
  • 1
  • 1
Yerko Palma
  • 12,041
  • 5
  • 33
  • 57