---
name: "up.link.config"
area: "API"
kind: "Configuration object"
parent: "up.link module"
url: "https://unpoly.com/api/up.link.config"
---
<nav aria-label="Unpoly docs">[All docs](https://unpoly.com/index.md) · [up.link module](https://unpoly.com/api/up.link.md)</nav>

# up.link.config

Configures defaults for link handling.

In particular, you can configure Unpoly to handle [all links on the page](https://unpoly.com/learn/handling-all-links.md) without requiring developers to set `[up-...]` attributes.

---

## Value {#value}

### Followable links {#value-followable-links}

#### config.followSelectors {#config.followSelectors}

An array of CSS selectors matching links that will be [followed through Unpoly](https://unpoly.com/api/up-follow.md).

You can customize this property to automatically follow _all_ links on a page without requiring an [`[up-follow]`](https://unpoly.com/api/up-follow.md) attribute. See [Handling all links](https://unpoly.com/learn/handling-all-links.md).

Type: [Array](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array)<string>

#### config.noFollowSelectors {#config.noFollowSelectors}

Exceptions to `up.link.config.followSelectors`.

Matching links will _not_ be [followed through Unpoly](https://unpoly.com/api/up-follow.md), even if they match `up.link.config.followSelectors`.

By default Unpoly excludes:

- Links with an `[up-follow=false]` attribute. Also see [boolean attributes](https://unpoly.com/learn/attributes-and-options.md#boolean-attributes).
- Links with a [`[download]`](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/a#attr-download) attribute.
- Links with a [`[target]`](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/a#attr-target) attribute (to target an iframe or open new browser tab).
- Links with a `javascript:`, `mailto:` or `tel:` scheme.
- Links with a cross-origin `[href]`.
- Links with an `[href]` that only contains a `#hash` (like `#` or `#section`) and don't also have local HTML in an `[up-document]`, `[up-fragment]`, or `[up-content]` attribute.
- Any additional exceptions configured in `up.link.config.noFollowSelectors`.

Type: [Array](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array)<string>

### Instant click {#value-instant-click}

#### config.instantSelectors {#config.instantSelectors}

An array of CSS selectors matching elements that are [activated on `mousedown`](https://unpoly.com/api/up-instant.md) instead of on `click`.

You can customize this property to follow _all_ links on `mousedown` without requiring an [`[up-instant]`](https://unpoly.com/api/up-instant.md) attribute. See [Handling all links](https://unpoly.com/learn/handling-all-links.md).

Note that an instant link must also be [followable](https://unpoly.com/api/up.link.isFollowable.md), usually by giving it an [`[up-follow]`](https://unpoly.com/api/up-follow.md) attribute or by configuring `up.link.config.followSelectors`.

Type: [Array](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array)<string>

#### config.noInstantSelectors {#config.noInstantSelectors}

Exceptions to `up.link.config.instantSelectors`.

Matching links will _not_ be [followed on `mousedown`](https://unpoly.com/api/up-instant.md), even if they match `up.link.config.instantSelectors`.

By default Unpoly excludes:

- Elements with an `[up-instant=false]` attribute.
- Links that are [not followable](#config.noFollowSelectors).

Type: [Array](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array)<string>

### Preloading {#value-preloading}

#### config.preloadSelectors {#config.preloadSelectors}

An array of CSS selectors matching links that are [preloaded on hover](https://unpoly.com/learn/preloading.md#on-hover).

You can customize this property to preload _all_ links on hover without requiring an [`[up-preload]`](https://unpoly.com/api/up-preload.md) attribute. See [Handling all links](https://unpoly.com/learn/handling-all-links.md).

Type: [Array](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array)<string>

#### config.noPreloadSelectors {#config.noPreloadSelectors}

Exceptions to `up.link.config.preloadSelectors`.

Matching links will _not_ be [preloaded on hover](https://unpoly.com/learn/preloading.md#on-hover), even if they match `up.link.config.preloadSelectors`.

By default Unpoly excludes:

- Links with an `[up-preload=false]` attribute.
- Links that are [not followable](#config.noFollowSelectors).
- Links with an [unsafe method](https://unpoly.com/api/up.link.isSafe.md).
- When the link destination [cannot be cached](https://unpoly.com/api/up.network.config.md#config.autoCache).

Type: [Array](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array)<string>

#### [config.preloadDelay=90] {#config.preloadDelay}

(optional)

The number of milliseconds to wait before [preloading on hover](https://unpoly.com/learn/preloading.md#on-hover).

Type: number

### Interactive elements {#value-interactive-elements}

#### [config.clickableSelectors] (Experimental) {#config.clickableSelectors}

(optional)

A list of CSS selectors matching elements that should behave like links or buttons.

See [Elements that act like links or buttons](https://unpoly.com/learn/faux-interactive-elements.md).

Type: [Array](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array)<string>

#### [config.noClickableSelectors] (Experimental) {#config.noClickableSelectors}

(optional)

Exceptions to `up.link.config.clickableSelectors`.

Matching elements will _not_ receive [interactive behavior](https://unpoly.com/api/up-follow.md), even if they match `up.link.config.clickableSelectors`.

Type: [Array](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array)<string>

