Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/cheapsteak/inject-prefetch
https://github.com/cheapsteak/inject-prefetch
Last synced: about 1 month ago
JSON representation
- Host: GitHub
- URL: https://github.com/cheapsteak/inject-prefetch
- Owner: cheapsteak
- License: isc
- Created: 2018-05-30T20:34:30.000Z (over 6 years ago)
- Default Branch: master
- Last Pushed: 2018-05-30T20:38:56.000Z (over 6 years ago)
- Last Synced: 2024-12-14T06:33:56.501Z (about 1 month ago)
- Language: JavaScript
- Size: 1.95 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# inject-prefetch
Dynamically inject prefetch tags into the page header.
If the tag for the resource already exists, this will _not_ create a duplicate tag.
#### Useage
```js
var prefetch = require('inject-prefetch');prefetch('http://....');
```
or
```js
var assetsToPrefetch = [url1, url2, url3, url4];prefetch(assetsToPrefetch);
```