Skip to content

Commit

Permalink
docs: add docs for rangeRequests (#64)
Browse files Browse the repository at this point in the history
thanks to @CarterLi
  • Loading branch information
pooya parsa committed Feb 7, 2019
1 parent f61861e commit 647adc0
Showing 1 changed file with 30 additions and 0 deletions.
30 changes: 30 additions & 0 deletions docs/modules/workbox.md
Original file line number Diff line number Diff line change
Expand Up @@ -204,3 +204,33 @@ you have to enable `manifst.crossorigin` in `nuxt.config.js`:
```

Thanks to [@henrixapp](https://github.com/henrixapp) for the tip.

### Enable rangeRequests

Safari requires rangeRequests.

`plugins/workbox-range-request.js`:

```js
workbox.routing.registerRoute(
/.*\.(mp4|webm)/,
workbox.strategies.cacheFirst({
plugins: [
new workbox.rangeRequests.Plugin(),
],
}),
'GET'
);
```

`nuxt.config.js`:

```js
{
workbox: {
cachingExtensions: '@/plugins/workbox-range-request.js'
}
}
```

Thanks to [@CarterLi](https://github.com/CarterLi) for the tip.

0 comments on commit 647adc0

Please sign in to comment.