Great guide by @tomayac on using `Request.destination` to handle different request types, well... differentlyhttps://medium.com/dev-channel/service-worker-caching-strategies-based-on-request-types-57411dd7652c …
-
Show this thread
-
Since file extensions are a hot mess, destination is the only reliable way we have to know how a resource will be used by the browser, and change logic based on that
1 reply 2 retweets 3 likesShow this thread
Replying to @yoavweiss @tomayac
Also, `destination` is one of the fields exposed by @mikewest's Sec-Metadata request header proposal (https://mikewest.github.io/sec-metadata/ ). Knowing that the response is going to be used as a {script, document, ...} can help the server make meaningful security decisions.
2:15 AM - 21 Aug 2018
0 replies
2 retweets
3 likes
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.