Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

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.

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

```