Intent to Ship: Service Worker Cache API's match(...)

52 views
Skip to first unread message

Kenji Baheux

unread,
Dec 12, 2014, 3:24:10 AM12/12/14
to blink-dev, Josh Karlin

Contact emails

Engineering: jka...@chromium.org (PM: kenji...@chromium.org)


Spec

Editor's draft (W3C Public Working Draft)


Summary

This intent to ship adds the following API to the Service Worker subset we shipped in M40[1]:

  • ServiceWorker Cache API’s match


API level detail


Having match() available natively is a win for performance and help us with our plan to retire the hybrid native + polyfill approach we’ve been recommending so far.




Link to “Intent to Implement” blink-dev discussion

https://groups.google.com/a/chromium.org/d/msg/blink-dev/Du9lhfui1Mo/HxL_pS7Cl-AJ

The spec and project used to be called Navigation Controller, but the name was changed to Service Worker.



Is this feature supported on all five Blink platforms (Windows, Mac, Linux, Chrome OS and Android)?

Yes.



Debuggability

[New in M41] you can now inspect Caches directly from DevTools!



Compatibility Risk

Pluses and minuses:

+ This is a relatively small addition to a shipping API surface

+ There's a second public working draft of the spec.

+ Mozilla is implementing Service Workers in Firefox, see bug 903441.

+ The team has been writing W3C testharness.js tests first, and only using Blink-specific tests for crashing and GC-related things. We plan to upstream these tests to W3C.

- The spec is under active development. However, match() has been stable for a long time.



OWP launch tracking bug?

http://crbug.com/440304



Link to entry on the feature dashboard

http://www.chromestatus.com/feature/6561526227927040



[1] Link to past Intent to Ship

- Intent to ship Service Worker

- Intent to ship Cache API for Service Worker



--
Kenji BAHEUX
Product Manager - Chrome
Google Japan

Chris Harrelson

unread,
Dec 12, 2014, 11:51:54 AM12/12/14
to Kenji Baheux, blink-dev, Josh Karlin
LGTM

To unsubscribe from this group and stop receiving emails from it, send an email to blink-dev+...@chromium.org.

Philip Jägenstedt

unread,
Dec 12, 2014, 6:37:12 PM12/12/14
to Kenji Baheux, blink-dev, Josh Karlin
LGTM, this looks like a pretty central piece of Service Workers. Even if it can be polyfilled with Cache.keys() the first code examples people try may just be http://jakearchibald.com/2014/service-worker-first-draft/ which uses Cache.match() a lot.

Cache.match() is defined in the spec in terms of Cache.matchAll(), but this doesn't seem to be the case in the implementation, and Cache.matchAll() isn't exposed in the IDL yet: http://crbug.com/428363

Since one is defined in terms of the other I think they should ideally be shipped together, at least if matchAll() is an easy to fix that nobody has gotten around to yet. LGTM either way.

Philip

To unsubscribe from this group and stop receiving emails from it, send an email to blink-dev+...@chromium.org.

Kenji Baheux

unread,
Dec 16, 2014, 10:57:20 PM12/16/14
to blin...@chromium.org, kenji...@google.com, jka...@chromium.org


On Saturday, December 13, 2014 8:37:12 AM UTC+9, Philip Jägenstedt wrote:
LGTM, this looks like a pretty central piece of Service Workers. Even if it can be polyfilled with Cache.keys() the first code examples people try may just be http://jakearchibald.com/2014/service-worker-first-draft/ which uses Cache.match() a lot.

Yes, indeed!

 
Cache.match() is defined in the spec in terms of Cache.matchAll(), but this doesn't seem to be the case in the implementation, and Cache.matchAll() isn't exposed in the IDL yet: http://crbug.com/428363

Since one is defined in terms of the other I think they should ideally be shipped together, at least if matchAll() is an easy to fix that nobody has gotten around to yet. LGTM either way.


Unfortunately, a native implementation of matchAll isn't easy enough to make it in time for M41's branch cut.

Dimitri Glazkov

unread,
Dec 16, 2014, 10:58:10 PM12/16/14
to Kenji Baheux, blink-dev, Kenji Baheux, jka...@chromium.org
LGTM3

Philip Jägenstedt

unread,
Dec 17, 2014, 3:18:33 AM12/17/14
to Kenji Baheux, blink-dev, kenji...@google.com, jka...@chromium.org
Fair enough, I thought perhaps it was only a few more lines of code.

Philip
Reply all
Reply to author
Forward
0 new messages