-
Notifications
You must be signed in to change notification settings - Fork 22.6k
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
Adds updateViaCache #6850
Adds updateViaCache #6850
Conversation
Adds `updateViaCache()` method to ServiceWorkerRegistration.
Preview URLs
FlawsNote! 1 document with no flaws that don't need to be listed. 🎉 URL:
URL:
External URLsURL: No new external URLs URL: No new external URLs URL:
(this comment was updated 2021-07-21 18:15:03.931201) |
@hamishwillee can you help me in rephrasing the content of |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you for submitting this. This is free of typos, which I really appreciate. There are some matters of MDN style that you need to address. I'm available to answer questions and I'm here to help.
files/en-us/web/api/serviceworkerregistration/updateviacache/index.html
Outdated
Show resolved
Hide resolved
files/en-us/web/api/serviceworkerregistration/updateviacache/index.html
Outdated
Show resolved
Hide resolved
files/en-us/web/api/serviceworkerregistration/updateviacache/index.html
Outdated
Show resolved
Hide resolved
files/en-us/web/api/serviceworkerregistration/updateviacache/index.html
Outdated
Show resolved
Hide resolved
…ndex.html Co-authored-by: Joe Medley <[email protected]>
…ndex.html Co-authored-by: Joe Medley <[email protected]>
Co-authored-by: Joe Medley <[email protected]>
Co-authored-by: Joe Medley <[email protected]>
files/en-us/web/api/serviceworkerregistration/updateviacache/index.html
Outdated
Show resolved
Hide resolved
files/en-us/web/api/serviceworkerregistration/updateviacache/index.html
Outdated
Show resolved
Hide resolved
…ndex.html Co-authored-by: Joe Medley <[email protected]>
@jpmedley thank you for assisting me : ) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@Blakelist7 Thank you for your patience with this. The style of a reference work is different from the writing style you were taught in school. I think we're almost done, though.
files/en-us/web/api/serviceworkerregistration/updateviacache/index.html
Outdated
Show resolved
Hide resolved
Co-authored-by: Joe Medley <[email protected]>
Co-authored-by: Joe Medley <[email protected]>
Co-authored-by: Joe Medley <[email protected]>
Co-authored-by: Joe Medley <[email protected]>
Co-authored-by: Joe Medley <[email protected]>
…ndex.html Co-authored-by: Joe Medley <[email protected]>
updateViaCache on the registration is a getter for the value it was originally registered with, as far as I can see - it's not a method. https://w3c.github.io/ServiceWorker/#service-worker-registration-updateviacache
Related to these changes. The "without consulting caches" part does seem to be the current behaviour in Chrome and Firefox (the only ones I tried). However I don't see anything in the spec (Update algorithm) that says it should behave this way. That bit was checked in in "initial en-us content checkin" on this repo, so I can't find any discussion/basis for it. |
Yes it appears the "without consulting caches" bit was removed at some point - |
I reported this about the "without consulting cache" thing, I might be wrong https://bugs.chromium.org/p/chromium/issues/detail?id=1232383. |
@robatwilliams Can you please open a ticket on this issue and we'll handle it in a separate PR. Long-lived PRs have a tendency to acquire merge conflicts, and this one was getting a little old. |
* 'main' of https://github.com/mdn/content: Adds updateViaCache (mdn#6850) Remove mentions of RTCDataChannelInit dictionary (mdn#7148) chore(deps): bump @mdn/yari from 0.4.652 to 0.4.658 (mdn#7427) Update PULL_REQUEST_TEMPLATE in GitHub actions (mdn#7405) Fix example in WebGL2RenderingContext.getBufferSubData (mdn#7418) Make CSS dl elements MArkdown-convertible (mdn#7403) Clarify WebGLContext.drawElements' count parameter (mdn#7417) Fix live sample for custom input validation (mdn#7408) Remove use of figure element from Web/CSS (mdn#7409) the label in the continue is optional. (mdn#7406) Change 'semantic' to 'semantics' (mdn#7401) Replace offensive words in CORS documentation (mdn#7396)
Apologies, I was wrong about the issue and didn't mean to distract. However the original point still stands, yet the PR was merged:
|
</li> | ||
</ul> | ||
</li> | ||
<li><code>updateViaCache</code>: A string indicating how much of a service worker's resources will be updated when a call is made to {{domxref('ServiceWorkerRegistration.updateViaCache')}}. Valid values are: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should say "when a calle is made to ServiceWorkerRegistration.update()"
@@ -72,6 +72,8 @@ <h2 id="Methods">Methods</h2> | |||
<dd>Checks the server for an updated version of the service worker without consulting caches.</dd> | |||
<dt>{{domxref("ServiceWorkerRegistration.unregister()")}}</dt> | |||
<dd>Unregisters the service worker registration and returns a {{jsxref("Promise")}}. The service worker will finish any ongoing operations before it is unregistered.</dd> | |||
<dt>{{domxref("ServiceWorkerRegistration.updateViaCache")}}</dt> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is actually a property which allows you to retrieve the original value provided at registration.
@@ -72,6 +72,8 @@ <h2 id="Methods">Methods</h2> | |||
<dd>Checks the server for an updated version of the service worker without consulting caches.</dd> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
"without consulting caches" should be removed, or elaborated to mention respecing updateViaCache
--- | ||
<div>{{APIRef("Service Workers API")}}</div> | ||
|
||
<p>The <code><strong>updateViaCache()</strong></code> method of the |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
As mentioned in the other comment, it's a property not a method.
https://developer.mozilla.org/en-US/docs/Web/API/ServiceWorkerRegistration/update should be mention updateViaCache
I didn't originally consider it necessary to point out every individual incorrectness on this PR relating to this, but I now have. Unless I'm misunderstood, IMO this PR should be reverted @jpmedley |
Adds
updateViaCache()
method to ServiceWorkerRegistration.Fixes #6729