English
@vite-pwa/workbox-swkit/routing
PackageDeclaration: @vite-pwa/workbox-swkit/routing
Class Summary
| Type | Description |
|---|---|
| NavigationRoute | NavigationRoute makes it easy to create a workbox-routing.Route that matches for browser [navigation requests]https://developers.google.com/web/fundamentals/primers/service-workers/high-performance-loading#first_what_are_navigation_requests. |
| RegExpRoute | RegExpRoute makes it easy to create a regular expression based workbox-routing.Route. |
| Route | A Route consists of a pair of callback functions, "match" and "handler". The "match" callback determine if a route should be used to "handle" a request by returning a non-falsy value if it can. The "handler" callback is called when there is a match and should return a Promise that resolves to a Response. |
| Router | The Router can be used to process a FetchEvent using one or more workbox-routing.Route, responding with a Response if a matching route exists. |
Function Summary
| Name | Description |
|---|---|
| registerRoute | Easily register a RegExp, string, or function with a caching strategy to a singleton Router instance. |
| setCatchHandler | If a Route throws an error while handling a request, this handler will be called and given a chance to provide a response. |
| setDefaultHandler | Define a default handler that's called when no routes explicitly match the incoming request. |
Interface Summary
| Type | Description |
|---|---|
| NavigationRouteMatchOptions |
Type Alias Summary
| Name | Description |
|---|---|
| HTTPMethod |