feat(plus/offline): add offline mode using yari client - #531
Merged
Conversation
Contributor
|
990940d was deployed to: https://fred-pr531.review.mdn.allizom.net/ |
caugner
approved these changes
Aug 14, 2025
caugner
left a comment
Contributor
There was a problem hiding this comment.
LGTM, and tested.
- After enabling MDN Offline Storage, status says "Up to date" (an old issue):

- After enabling auto-update, it starts downloading:

- Then it starts unpacking:

- After finishing unpacking, it shows "Up to date", while "Storage used" still shows "0 MiB":

- After refreshing the page, the button colors changed, and "Storage used" shows up as "257 MiB":

- After enabling "Prefer online content", and refreshing:

- Browsing with "Prefer online content" enabled seems to work (shows fred).
- Browsing with "Prefer online content" disabled seems to work (shows yari from December).
- After clicking "Clear data", downloading starts again (probably an old issue):

- Trying to cancel the download by disabling auto-update, and refreshing, doesn't seem to load (probably an old issue), but works after hard-reload, although status remains "Downloading…" (because we don't support cancelling the download/unpack process).
- After disabling "MDN Offline Storage" again, this setting persist after a refresh.
caugner
reviewed
Aug 14, 2025
Member
Author
I had a go at fixing this in mdn/yari#13386, but this causes problems of its own (the button looks clickable but doesn't do anything until the service worker has cached the static assets and activated). I'll have another attempt at fixing this later today. |
caugner
reviewed
Apr 28, 2026
| "css-loader": "^7.1.2", | ||
| "css-minimizer-webpack-plugin": "^7.0.2", | ||
| "dexie": "^4.0.11", | ||
| "downshift": "^9.0.10", |
Contributor
There was a problem hiding this comment.
@LeoMcA Do you remember why you added downshift as a Fred dependency here?
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Relates to: #525
Would advise reviewing commit-by-commit, as the first commit simply copies over the pwa files from yari (with prettier applied), and the second commit makes the real changes to support offline in fred.
Testable in the review environment (if you do the login dance with replacing the url), but I'll be deploying this specially to test too (to test the yari -> fred "migration").
You'll know it's working if, after downloading, yari starts rendering pages instead of fred. Disable "prefer offline" to get fred rendering pages until you pull the network cable.