Skip to content

Offline support#1

Open
MartinElsaesser wants to merge 3 commits intotheaquarium:mainfrom
MartinElsaesser:main
Open

Offline support#1
MartinElsaesser wants to merge 3 commits intotheaquarium:mainfrom
MartinElsaesser:main

Conversation

@MartinElsaesser
Copy link

Added offline support via a service worker and reworked your webmanifest.

@netlify
Copy link

netlify bot commented Jun 3, 2023

Deploy Preview for astounding-macaron-61432f ready!

Name Link
🔨 Latest commit 2fee5fa
🔍 Latest deploy log https://app.netlify.com/sites/astounding-macaron-61432f/deploys/647b476fe34afd00089717b4
😎 Deploy Preview https://deploy-preview-1--astounding-macaron-61432f.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site settings.

@theaquarium
Copy link
Owner

Hey Martin, thanks for making this change! However, it looks like the service workers are registering only the /matrix/ path, which doesn't actually exist.

@MartinElsaesser
Copy link
Author

Well first up I am actually pretty new to doing merge requests. I initially just wanted the offline support commit to be merged. So I pushed the offline support commit to github and made my merge request. After that I reworked the paths to fit the github pages paths. I didn't know that these additional commits were added here as well.

@theaquarium
Copy link
Owner

  1. No worries! Any commits you add to the branch the pull request is connected to will be updated as part of the PR.
  2. I'm not sure I totally understand. Do you want this PR to get merged into my repository to be a part of the public site?
  3. Either way, your paths seem incorrect:

You're registering a service worker file at /matrix/sw.js

navigator.serviceWorker.register('/matrix/sw.js',

and that is caching files in /matrix/

const PRECACHE_URLS = [
    "/matrix/",
    "/matrix/controls.js",
    ...
    "/matrix/sortandpop.js",
    "/matrix/utils.js",
];

Those files don't exist though. Everything is in the root directory and /matrix/ doesn't exist. Is that right or am I missing something?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants