question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Offline Page to be used in PWA

See original GitHub issue

Describe the feature

Build process should be able to generate an offline page e.g. offline.html similar to index.html or 200.html page that is built when ssr is false. This offline page can be used by PWA / Service Worker so that application may fallback to SPA when user is offline.

Additional information

  • Would you be willing to help implement this feature?
  • Could this feature be implemented as a module?

Final checks

Issue Analytics

  • State:open
  • Created a year ago
  • Comments:7 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
toniengelhardtcommented, Sep 19, 2022

Yes, it makes sense, pre-caching all routes should be an option to turn on/off. But PWAs that are published in the PlayStore for instance should behave exactly like native apps, meaning all routes should work offline, not only the ones that were visited. But it’s a different use case from yours I think.

1reaction
jguptacommented, Sep 19, 2022

Check out my example https://www.hom.wang

It appears you are caching all pages a user visits but that is not what we want to do since it will make only a few pages to work. For e.g. a user visits page A then it would can be used offline but page B won’t work.

We want to provide an entire offline SPA experience if a user is offline using workbox offline fallback. There might be a few sections which won’t work offline but we can still make a large part work in our use case.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Making PWAs work offline with Service workers
The "offline first" — or "cache first" — pattern is the most popular strategy for serving content to the user. If a resource...
Read more >
Progressive Web Apps: Going Offline - Google Developers
Welcome. In this lab, you'll take an existing web application and make it work offline. This is the first in a series of...
Read more >
Create an offline fallback page - web.dev
This can be a simple branded page with the information that the user is currently offline, but it can just as well be...
Read more >
How to Make Your PWA Work Offline - SimiCart
In order for your PWA to be offline-capable, service workers pay a part in serving the content, but you'd also need to cache...
Read more >
Offline pages in Progressive Web Apps - harrytheo.com
A step-by-step guide on how to store and list offline available pages using Service Workers and the Cache API on the web.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found