Closed rizalibnu closed 6 years ago
Can you be more specific about the error you're getting? Or why your app shouldn't be used offline?
@rizalibnu Is this because you're trying to create a browser history from the server side?
As I said in #5 , serviceworker tells the browser to use the cached page index.html in priority. It make sense that offline use with service worker and ssr are incompatible, because offline website must use a base page kept in cache that is independent from the data being fetch, and SSR returns the full page containing the latest data. They are incompatible but still it's usefull to have SSR for older browser that don't support service worker so that the first load of the page is faster.
Service workers aren't supported in server-side rendering.
I try to comment function call registerServiceWorker in /src/index.js, SSR is working correctly, but when uncomment that, SSR not working. I think this is very important because disable service worker make app can't support offline.