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 cache issues (Remaining: display checksum of latest commit + date of last update) #605

Open
6 of 8 tasks
jywarren opened this issue Jan 4, 2019 · 11 comments
Open
6 of 8 tasks

Comments

@jywarren
Copy link
Member

jywarren commented Jan 4, 2019

Just reporting a few issues with the offline cache function, maybe related to #544.

Noting our main issues: we don't have an easy way to:

  1. tell if it's being used
  2. when it was updated
  3. what version we're using in the demo

We can break out solutions and sub-issues from here. Just want to say the offline cache is AMAZING and has saved me a number of times when demonstrating this to people. Just looking to expand and refine it. Thank you!!!

  • can we display the package.json version on the page to show what version we are at?
  • can we also display the checksum of the latest commit?
  • can we show the date of last update?
  • the cache version numbering (v3) hasn't changed in a long time. Do we have to manually update this in examples/sw.js? (I tried but to no effect)
  • maybe we need it to say something a little more specific, like, A new version is available. Click to update.
  • neither button seems to update the cache
  • we should document how this works somewhere so we can maintain it
  • as in below image, i see 2 links to clear cache
  • can we isolate all the cache-related code as much as possible into /examples/lib/cache/...? (Not possible because of scopes -- @harshkhandeparkar )

image

Sent from my OnePlus3 using FastHub

@gitmate
Copy link

gitmate bot commented Jan 4, 2019

GitMate.io thinks possibly related issues are #118 (Assorted improvements to be broken into separate issues), #544 (Clear offline cache link not working properly.), #48 (A Semantic Issue), #227 (PLANNING ISSUE), and #388 (Creating a new issue template).

1 similar comment
@gitmate
Copy link

gitmate bot commented Jan 4, 2019

GitMate.io thinks possibly related issues are #118 (Assorted improvements to be broken into separate issues), #544 (Clear offline cache link not working properly.), #48 (A Semantic Issue), #227 (PLANNING ISSUE), and #388 (Creating a new issue template).

@Mridul97
Copy link

Mridul97 commented Jan 5, 2019

@jywarren the cache seems to be updating, please see the below gif,

cache

To change the cache version number we have to change it manually in sw.js file and then it will get update when we go to the website next time, it does not updates on reload. Please see the gif below :

cache2

We can tie the npm version to the cache version, if we can get the value of npm version in sw.js. Do we manually update the value of npm version?

I like the idea to isolate the cache code and would love to work on it! I will remove the other cache button, as it has no use. I would like to document the working as well. Thanks!

@vibhorgupta-gh
Copy link

Yes, that's exactly what I noticed too, the cache works fine for me.

@harshkhandeparkar
Copy link
Member

harshkhandeparkar commented Mar 17, 2019

Some issues are fixed and docs part is mentioned in another issue #761.

@jywarren jywarren mentioned this issue Apr 17, 2019
4 tasks
@jywarren
Copy link
Member Author

Hi all, regarding cache, we don't have an easy way to tell if it's being used, when it was updated, or what version we're using in the demo. I think we should consider turning caching off until we can address these as they may be preventing us from diagnosing and detecting these kinds of issues:

#1061

@jywarren
Copy link
Member Author

I've updated the issue above to highlight our main problems and added a few more steps that could be broken out.

@harshkhandeparkar
Copy link
Member

@jywarren I think we can do something in the long term to improve the service worker, we can build it dynamically using maybe browserify or something. We can keep the code separately and maybe make a grunt task to compile it.

@harshkhandeparkar
Copy link
Member

Some parts were completed in #1364

@jywarren jywarren changed the title Assorted offline cache issues Assorted offline cache issues (Remaining: display checksum of latest commit) Nov 17, 2020
@jywarren jywarren changed the title Assorted offline cache issues (Remaining: display checksum of latest commit) Assorted offline cache issues (Remaining: display checksum of latest commit + date of last update) Nov 17, 2020
@jywarren jywarren changed the title Assorted offline cache issues (Remaining: display checksum of latest commit + date of last update) Offline cache issues (Remaining: display checksum of latest commit + date of last update) Nov 17, 2020
@jywarren
Copy link
Member Author

Updated to show 2 remaining pieces - the checksum of the last commit and the date of last update. Thanks!

@jywarren
Copy link
Member Author

Confirming this worked (except 2 remaining pieces) for v3.7.1:

Screen Shot 2022-01-15 at 2 25 29 PM
Screen Shot 2022-01-15 at 2 25 39 PM

Screen Shot 2022-01-15 at 2 25 42 PM

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

No branches or pull requests

4 participants