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

# [up-meta]

Configures whether this `<head>` element is updated during [history changes](https://unpoly.com/learn/updating-history.md).

<nav aria-label="Guides">

- [Learn: Updating history](https://unpoly.com/learn/updating-history.md)

</nav>

<nav aria-label="Contents">

#### Contents

- [Default meta elements](#default-meta-elements)
- [Including additional elements](#including-meta-tags)
- [Excluding elements](#excluding-meta-tags)

</nav>

## Default meta elements {#default-meta-elements}

By [default](https://unpoly.com/api/up.history.config.md#config.metaTagSelectors), popular `<meta>` and certain `<link>` elements in the `<head>` are considered meta tags. They will be updated when history is changed, in addition to the document's title and URL.

```html
<link rel="canonical" href="https://example.com/dresses/green-dresses">
<meta name="description" content="About the AcmeCorp team">
<meta property="og:image" content="https://app.com/og.jpg">
<script src="/assets/app.js"></script>
<link rel="stylesheet" href="/assets/app.css">
```

The linked JavaScript and stylesheet are _not_ part of history state and will not be updated during history changes.

## Including additional elements {#including-meta-tags}

To update additional `<head>` elements during history changes, mark them with an `[up-meta]` attribute:

```html
<link rel="license" href="https://opensource.org/license/mit/" up-meta>
```

Only elements in the `<head>` can be matched this way.

To include additional elements by default, configure [`up.history.config.metaTagSelectors`](https://unpoly.com/api/up.history.config.md#config.metaTagSelectors).

## Excluding elements {#excluding-meta-tags}

To leave a `<head>` element unchanged during history changes, set an `[up-meta=false]` attribute:

```html
<meta charset="utf-8" up-meta="false">
```

To exclude elements by default, configure [`up.history.config.noMetaTagSelectors`](https://unpoly.com/api/up.history.config.md#config.noMetaTagSelectors).

