You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Using request.destination as a criteria for routing to a specific response strategy offers some advantages over URL-based matching, since your routing logic would not have to change as much due to changes in your URL structure.
A new RequestDestinationRoute class in workbox-routing could simplify creating routes that use that info. (The alternative is asking folks to write a custom matchCallback.)
One wrinkle is that applying a different strategy based on whether a request is same- or cross-origin is frequently important, and you lose that nuance if you just check for request.destination. So perhaps there would need to be some configuration when constructing RequestDestinationRoute that allowed you to opt-in to cross-origin matching.
The text was updated successfully, but these errors were encountered:
Thanks for opening this issue, @jeffposnick! Some more background on this feature request can be found in this article. People can play with the property and see it in action in the Request.destination playground app.
This was suggested by @tomayac.
Using
request.destination
as a criteria for routing to a specific response strategy offers some advantages over URL-based matching, since your routing logic would not have to change as much due to changes in your URL structure.A new
RequestDestinationRoute
class inworkbox-routing
could simplify creating routes that use that info. (The alternative is asking folks to write a custommatchCallback
.)One wrinkle is that applying a different strategy based on whether a request is same- or cross-origin is frequently important, and you lose that nuance if you just check for
request.destination
. So perhaps there would need to be some configuration when constructingRequestDestinationRoute
that allowed you to opt-in to cross-origin matching.The text was updated successfully, but these errors were encountered: