Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Build out app cache sync event #1

Open
DanielBaulig opened this issue Nov 11, 2023 · 1 comment
Open

Build out app cache sync event #1

DanielBaulig opened this issue Nov 11, 2023 · 1 comment
Labels
enhancement New feature or request

Comments

@DanielBaulig
Copy link
Owner

Currently the app cache will get updated when the user loads the application over the network. If the network is not reachable while the app gets loaded, the app cache will not get updated for the session. I could use the Background Sync API to trigger an update of the app cache as soon as the network recovers during the same session.

@DanielBaulig DanielBaulig added the enhancement New feature or request label Nov 11, 2023
@DanielBaulig
Copy link
Owner Author

Some more things to consider for app cache:

  • drop manifest plugin and use vite-manifest to query for changes
  • consider switching to network first for entry documents (i.e. index.html). Page load will be slower, but user would always get the most recent version of the app immediately.
  • only start refreshing/populating app-cache after page has fully loaded and rendered, i.e. document informs the SW that it can go an update the app cache
  • build out a UI in the app that informs the user that a new version of the app is available and prompts them to reload. This could be used for both a post load new app version and if the app version gets refreshed upon network recovery if loaded from SW.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant