Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/ttulka/prelinks
Eager caching for web pages.
https://github.com/ttulka/prelinks
caching javascript links speedup user-experience ux web
Last synced: 21 days ago
JSON representation
Eager caching for web pages.
- Host: GitHub
- URL: https://github.com/ttulka/prelinks
- Owner: ttulka
- License: apache-2.0
- Created: 2020-07-16T06:05:37.000Z (over 4 years ago)
- Default Branch: master
- Last Pushed: 2022-12-30T20:52:16.000Z (about 2 years ago)
- Last Synced: 2024-12-16T17:52:18.901Z (about 2 months ago)
- Topics: caching, javascript, links, speedup, user-experience, ux, web
- Language: JavaScript
- Homepage:
- Size: 183 KB
- Stars: 0
- Watchers: 3
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# PreLinks - eager caching for web pages
- Cached before even visited!
- TurboLinks on steroids :-)This simple plugin loads and caches pages when the user shows a mere *intention to visit a link* - she just moves the cursor over the link and the target page is cached immediatelly.
That results in a very **quick navigating** among pages, **lower load**, and **better user experience**.
Once cached switching between links is super quick, the HTTP request is performed only once.
HTML head elements are merged, scripts are executed.
Small (6 KB) and easy to use.
Best fit for server-side rendered websites.
## Demo
## Build
```sh
npm install
npm run bundle
```## Usage
Put the script to the bottom of `` into each HTML page:
```html
```
### Settings
#### Disable prelinks for a link
To disable prelinks on a particular link, add the attribute `data-prelinks="false"`:
```html
...
```#### Disable caching for a link
To disable caching for a particular link, add the attribute `data-prelinks-cache="false"`:
```html
...
```#### Progress action
To enable an action for loading a page, put a meta tag `prelinks-progress` into ``:
```html
```
Possible values for `content` are:
- `none` (default)
- no action
- `blur`
- blur page#### Disable all caching
To disable caching completelly, put a meta tag `prelinks-cache-control` with `content="no-cache"` into ``:
```html
```