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

Offline-first PWA caching #2503

Open
taoeffect opened this issue Jan 11, 2025 · 1 comment · May be fixed by #2508
Open

Offline-first PWA caching #2503

taoeffect opened this issue Jan 11, 2025 · 1 comment · May be fixed by #2508
Assignees
Labels
App:Frontend Kind:Enhancement Improvements, new features, performance upgrades, etc. Note:UI/UX

Comments

@taoeffect
Copy link
Member

taoeffect commented Jan 11, 2025

Problem

The PWA takes longer to open than it needs to because we're not taking advantage of offline-caching of pages.

Solution

Get the site to work well offline and use the service worker's ability to cache requests to cache pages.

  • Take extra care to make sure that the site still reloads when a new version is released and the old cache is invalidated
  • Don't cache file attachments from chat
@taoeffect taoeffect added Kind:Enhancement Improvements, new features, performance upgrades, etc. App:Frontend Note:UI/UX labels Jan 11, 2025
@corrideat
Copy link
Member

corrideat commented Jan 12, 2025

This sounds like something we could use the fetch event (in the SW) along with the Cache API. The Cache API is pretty low-level, so we need to handle things like expiration manually.

I think that this should be simple enough to work on (maybe tomorrow?). It should be ready for either this upcoming release or the one following.

ETA: This could also be the stepping stone for adding assent signing. My recommendation is to proceed with this issue as originally described (i.e., as a simple cache), but we could later build on this to sign and verify signatures.

@corrideat corrideat linked a pull request Jan 14, 2025 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
App:Frontend Kind:Enhancement Improvements, new features, performance upgrades, etc. Note:UI/UX
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants