# reload

Source: https://zotonic.com/docs/2003/reload

URI: https://zotonic.com/id/2003

Language: en



Reload the current page.

Example:

```erlang
{% button text="refresh" action={reload} %}
```

Clicking on the button will reload the page. The page is reloaded by calling the Javascript function `z_reload()`. You can also pass optional arguments to the function.

Optional arguments:

z\_language: The language to reload the page in. If omitted or empty, the current language is preserved. An existing `z.lang` cookie is updated only in the top-level window. z\_rewrite\_url: When changing language, set this to true to put the language in the URL path. Otherwise the language is added as a `z_language` query parameter.

Other arguments are added as query variables, replacing existing values with the same name. For example, passing `foo=bar` on `/current/path` reloads `/current/path?foo=bar`. Unrelated existing query parameters are preserved.

License: 

Attribution: 

Related resources: https://zotonic.com/api/agent/related/2003?language=en


## API access

- [API help](<https://zotonic.com/api-help>)
- [OpenAPI specification](<https://zotonic.com/openapi.json>)
- [This resource as JSON](<https://zotonic.com/api/agent/resource/2003?language=en>)
