@slightlylate The decision to not let people use their own cache keys for requests -- was that for simplicity/security/something else?
-
-
Replying to @adrianholovaty
@adrianholovaty: reading your post again, I'm not sure you even need to do what you did.1 reply 0 retweets 0 likes -
Replying to @slightlylate
@adrianholovaty: Caches are keyed by Request, and you can cons up Requests however you like.1 reply 0 retweets 0 likes -
Replying to @slightlylate
@adrianholovaty: creating a simple-URL Request for the cache key is easy, same at fetch() time, but will require conversion there.1 reply 0 retweets 0 likes -
Replying to @slightlylate
@slightlylate Ah, so I would create a fake Request just for the purposes of the cache key?2 replies 0 retweets 0 likes -
Replying to @adrianholovaty
@adrianholovaty: ```js fetch(...).then((resp) => { let req = new Request("<simplified URL here>"); cache.put(req, resp); }, err); ```1 reply 0 retweets 3 likes -
Replying to @slightlylate
@slightlylate Can I just say I love that you took the time to put the semicolons and syntax highlighting hints in this JS-in-a-tweet.1 reply 0 retweets 1 like
@adrianholovaty: us olds gonna old it up.
That, or I'm just covering for my shitty grammar & spelling.
Loading seems to be taking a while.
Twitter may be over capacity or experiencing a momentary hiccup. Try again or visit Twitter Status for more information.
& Web Standards TL; Blink API OWNER
Named PWAs w/
DMs open. Tweets my own; press@google.com for official comms.