Skip to content

Commit

Permalink
docs(README): formatting -> recipe headings
Browse files Browse the repository at this point in the history
  • Loading branch information
addyosmani committed Dec 17, 2018
1 parent 41e70af commit 0073e2a
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ Alternatively, see the [Intersection Observer polyfill](https://github.com/w3c/I

## Recipes

**Set a custom timeout for prefetching resources**
### Set a custom timeout for prefetching resources

Defaults to 2 seconds (via `requestIdleCallback`). Here we override it to 4 seconds:

Expand All @@ -112,7 +112,7 @@ quicklink({
});
```

**Set the DOM element to observe for in-viewport links**
### Set the DOM element to observe for in-viewport links

Defaults to `document` otherwise.

Expand All @@ -123,7 +123,7 @@ quicklink({
});
```

**Set a custom array of URLs to be prefetched**
### Set a custom array of URLs to be prefetched

If you would prefer to provide a static list of URLs to be prefetched, instead of detecting those in-viewport, customizing URLs is supported.

Expand All @@ -133,15 +133,15 @@ quicklink({
});
```

**Set the request priority for prefetches**
### Set the request priority for prefetches

Defaults to low-priority (`rel=prefetch` or XHR). For high-priority (`priority: true`), attempts to use `fetch()` or falls back to XHR.

```js
quicklink({ priority: true });
```

**Specify a custom list of allowed origins**
### Specify a custom list of allowed origins

Provide a list of hostnames that should be prefetch-able. Only the same origin is allowed by default.

Expand All @@ -161,7 +161,7 @@ quicklink({
});
```

**Allow all origins**
### Allow all origins

Enables all cross-origin requests to be made.

Expand All @@ -175,7 +175,7 @@ quicklink({
});
```

**Custom Ignore Patterns**
### Custom Ignore Patterns

These filters run _after_ the `origins` matching has run. Ignores can be useful for avoiding large file downloads or for responding to DOM attributes dynamically.

Expand Down

0 comments on commit 0073e2a

Please sign in to comment.