Skip to content

Add an option to enable the service worker cache #1316

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

Merged
merged 7 commits into from
Mar 18, 2024

Conversation

jtpio
Copy link
Member

@jtpio jtpio commented Feb 19, 2024

References

Fixes #1103

Also related to:

The service worker caching is probably one of the biggest frustration points for JupyterLite users. Making it an opt-in might help make the user experience smoother.

Code changes

  • Add an (opt-in) option to enable the Service Worker cache.
  • Read from page config
  • Add to migration guide

User-facing changes

Hopefully less issues about missing files and after updating JupyterLite versions.

Backwards-incompatible changes

More of a change in behavior than a breaking change. Still need to be documented in the migration guide though.

Copy link
Contributor

lite-badge 👈 Try it on ReadTheDocs

@jtpio jtpio added the bug Something isn't working label Feb 19, 2024
@jtpio jtpio added this to the 0.3.0 milestone Feb 19, 2024
@jtpio jtpio marked this pull request as ready for review February 20, 2024 20:58
@jtpio jtpio marked this pull request as draft February 20, 2024 21:17
@jtpio
Copy link
Member Author

jtpio commented Feb 21, 2024

Need to do a bit more testing to make sure this actually has a real effect.

@jtpio
Copy link
Member Author

jtpio commented Feb 26, 2024

cc @martinRenou for an initial review, since you also opened #1294

This might still need some testing to make sure it has an actual effect. When I was trying to compare with a default deployment without this change it didn't look like the assets were served from the service worker (by looking at the dev tools).

@jtpio jtpio marked this pull request as ready for review February 28, 2024 13:37
@jtpio jtpio force-pushed the service-worker-cache branch from 5cc6728 to 997a922 Compare March 15, 2024 11:43
@jtpio
Copy link
Member Author

jtpio commented Mar 18, 2024

Getting this in so it can be tested in the next rc.

@jtpio jtpio merged commit 05478dc into jupyterlite:main Mar 18, 2024
@jtpio jtpio deleted the service-worker-cache branch March 18, 2024 13:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Aggressive caching by the service worker
1 participant