(Translated by https://www.hiragana.jp/)
Offline support · Issue #104 · JudahGabriel/Chavah · GitHub
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 support #104

Open
JudahGabriel opened this issue Sep 17, 2020 · 2 comments
Open

Offline support #104

JudahGabriel opened this issue Sep 17, 2020 · 2 comments
Labels

Comments

@JudahGabriel
Copy link
Owner

Step 1: It's fairly easy to make Chavah available offline by caching the shell (JS, CSS, HTML, shell images).

Step 2: We should also cache media files as users listen to them. The service worker should be updated to store media files (MP3s and album art) into a separate media cache. When requested from the CDN, we should load from the cache. (Stretch goal: coordinate caching these files with storage APIs to determine if caching it will succeed)

Step 3: If the user is offline, the UI should display a message saying we're offline, and telling the user they can only play previously-played songs. Disable song request button while offline.

@JudahGabriel
Copy link
Owner Author

Step 1 and 2 are now implemented.

@JudahGabriel
Copy link
Owner Author

JudahGabriel commented Dec 4, 2020

Step 2 is partially broken on some browsers due to Range requests. Currently, if the browser issues a range request (even if for the full range!) the response is a 206, which cannot be cached. Caching then fails.

We should probably just bite the bullet and use workbox with range caching.

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

No branches or pull requests

1 participant