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

[bug]: Please reopen #2351 #2561

Closed
fooman opened this issue Jul 17, 2020 · 6 comments
Closed

[bug]: Please reopen #2351 #2561

fooman opened this issue Jul 17, 2020 · 6 comments
Labels
bug Something isn't working Progress: done

Comments

@fooman
Copy link
Contributor

fooman commented Jul 17, 2020

There seem to be at least 2 comments indicating that #2390 is not a complete fix for #2351 - can we please reopen it.

@fooman fooman added the bug Something isn't working label Jul 17, 2020
@m2-assistant
Copy link

m2-assistant bot commented Jul 17, 2020

Hi @fooman. Thank you for your report.
To help us process this issue please make sure that you provided sufficient information.

Please, add a comment to assign the issue: @magento I am working on this


@sirugh
Copy link
Contributor

sirugh commented Feb 2, 2021

@fooman We lost track of this - do you have any idea if this is still an issue?

@fooman
Copy link
Contributor Author

fooman commented Feb 2, 2021

I suspect there could be, but it could also be my CDN settings masking something. Need to investigate.

I suspect it is an ongoing consideration with PWAs on how to force them to update and how to monitor I would suggest the following ideas as improvements for PWA Studio:

  • implement some diagnostics being sent from each PWA build. Maybe modifying the user agent to include a build number/date if that doesn't interfere with anything else
  • some way for the server to communicate that a forced update of the service worker is required

@fooman
Copy link
Contributor Author

fooman commented Feb 4, 2021

@sirugh There may now be another issue potentially masking this one. In recent months we have added default caching headers to static files served from a directory. This also applies to sw.js

image

From my current understanding this would mean that even if the server has an updated sw.js the browser will only check in its local cache for seven days before getting the latest version.

@sirugh
Copy link
Contributor

sirugh commented Feb 5, 2021

We investigated this a bit internally and found that while the cache-control header was present, the service worker was always being refetched. We did create an internal issue. https://jira.corp.magento.com/browse/PWA-1396, to remove the cache-control header from sw.js just to be safe, but it looks like browsers don't respect the cache-control header on the sw file unless you explicitly tell it to. We will keep an eye on this going forward, but could we close this issue and re-open 2351 as you originally requested?

@fooman
Copy link
Contributor Author

fooman commented Feb 8, 2021

hey @sirugh not really concerned if this gets closed or the other reopened. Just glad to hear it is on your radar. This discussion GoogleChrome/workbox#1528 (comment) seems to indicate that cache-control headers on sw.js can be an issue.

This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working Progress: done
Projects
None yet
Development

No branches or pull requests

2 participants