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

# [up-back]

Changes the link's destination so it points to the previous URL.

If no previous URL is known, the link will not be changed.

> <nav aria-label="Guides">
>
> - [Learn: Restoring history](https://unpoly.com/learn/restoring-history.md#back-link)
>
> </nav>
>
> #### Note
>
> Clicking an `[up-back]` link will _not_ call [`history.back()`](https://developer.mozilla.org/en-US/docs/Web/API/History/back). Instead, the link will [navigate](https://unpoly.com/api/up.navigate.md) to the previous URL.

## Example {#example}

This link …

```html
<a href="/default" up-back>
  Go back
</a>
```

… will be transformed to:

```html
<a href="/default" up-follow up-href="/previous-page" up-scroll="restore">
  Go back
</a>
```

