---
area: "Changes"
parent: "Changes"
url: "https://unpoly.com/changes/3.1.0"
released: "2023-05-04"
---
<nav aria-label="Unpoly docs">[All docs](https://unpoly.com/index.md) · [Changes](https://unpoly.com/changes.md)</nav>

# Version 3.1.0

Released on May 04, 2023 with [21 commits](https://github.com/unpoly/unpoly/commits/v3.1.0)

## Changes

This release addresses some issues when upgrading from Unpoly 2 to 3:

- Fix a bug where kept [`[up-keep]`](https://unpoly.com/api/up-keep.md) elements would call their destructors if the `<body>` element is swapped
- [Validation](https://unpoly.com/learn/validation.md) now throw an exception if a validation target cannot be matched (fixes [#476](https://github.com/unpoly/unpoly/issues/476))
- Fix a bug where focused date inputs would trigger a validation when destroyed
- ⚠️ [Cache revalidation](https://unpoly.com/learn/caching.md#revalidation) is now only the default when [navigating](https://unpoly.com/learn/navigation-defaults.md). If you render cached content without navigating, you must opt into cache revalidation with `{ cache: 'auto', revalidate: 'auto' }`.

If also fixes some bugs in [`unpoly-migrate.js`](https://unpoly.com/changes/upgrading.md):

- Fix a bug where the deprecated origin shorthand (`&`) in attribute selector values that contain both square brackets and ampersands (fixes [#478](https://github.com/unpoly/unpoly/issues/478))
- Fix a bug where [`up.$on()`](https://unpoly.com/api/up.$on.md) was not polyfilled properly
- Fix a bug where `up.$off()` was not polyfilled properly
- Fix a bug where [`up.$compiler()`](https://unpoly.com/api/up.$compiler.md) was not polyfilled properly
- Fix a bug where [`up.$macro()`](https://unpoly.com/api/up.$macro.md) was not polyfilled properly

Finally this release publishes a small feature:

- Published a new attribute [`[up-href]`](https://unpoly.com/api/up-href.md). Using this attribute you can make any element behave like a hyperlink when clicked.

## Upgrading {#upgrading}

If you're upgrading from an older Unpoly version you should load [`unpoly-migrate.js`](https://unpoly.com/changes/upgrading.md) to polyfill deprecated APIs. Changes handled by `unpoly-migrate.js` are not considered breaking changes.

See our [upgrading guide](https://unpoly.com/changes/upgrading.md) for details.

