|
Last change
on this file was 9af201e, checked in by MBK <marija.karapandzova@…>, 12 days ago |
|
Fix frontend appearance
|
-
Property mode
set to
100644
|
|
File size:
1.0 KB
|
| Line | |
|---|
| 1 | import { WorkboxPlugin } from 'workbox-core/types.js';
|
|---|
| 2 | import './_version.js';
|
|---|
| 3 | /**
|
|---|
| 4 | * The range request plugin makes it easy for a request with a 'Range' header to
|
|---|
| 5 | * be fulfilled by a cached response.
|
|---|
| 6 | *
|
|---|
| 7 | * It does this by intercepting the `cachedResponseWillBeUsed` plugin callback
|
|---|
| 8 | * and returning the appropriate subset of the cached response body.
|
|---|
| 9 | *
|
|---|
| 10 | * @memberof workbox-range-requests
|
|---|
| 11 | */
|
|---|
| 12 | declare class RangeRequestsPlugin implements WorkboxPlugin {
|
|---|
| 13 | /**
|
|---|
| 14 | * @param {Object} options
|
|---|
| 15 | * @param {Request} options.request The original request, which may or may not
|
|---|
| 16 | * contain a Range: header.
|
|---|
| 17 | * @param {Response} options.cachedResponse The complete cached response.
|
|---|
| 18 | * @return {Promise<Response>} If request contains a 'Range' header, then a
|
|---|
| 19 | * new response with status 206 whose body is a subset of `cachedResponse` is
|
|---|
| 20 | * returned. Otherwise, `cachedResponse` is returned as-is.
|
|---|
| 21 | *
|
|---|
| 22 | * @private
|
|---|
| 23 | */
|
|---|
| 24 | cachedResponseWillBeUsed: WorkboxPlugin['cachedResponseWillBeUsed'];
|
|---|
| 25 | }
|
|---|
| 26 | export { RangeRequestsPlugin };
|
|---|
Note:
See
TracBrowser
for help on using the repository browser.