# Reload the current page

Load the current document again.

Canonical: https://1loc.dev/dom/reload-the-current-page/
Version: 1.0.0
Runtime: JavaScript · modern browsers (DOM)
Verification: Reviewed, not executed: calling it navigates away from the page
Updated: 2026-10-28

## Implementation

```javascript
function reload() { location.reload(); }
```

## Usage

```javascript
reload(); // e.g. the page loads again; browsers may restore form fields and scroll position
```

Reviewed, not executed: calling it navigates away from the page.

## Limits

- Reloading discards in-memory state. Prefer updating the part of the page that changed.
- The original’s alternative, location.href = location.href, does not reload when the URL has a fragment: it only scrolls.

The function does not validate its arguments. Add checks where it receives untrusted input.

## Source and license

Original: https://github.com/phuocng/1loc/blob/14b481cf60dff1620ab1bb99a43b1f68068cdd9b/contents/reload-the-current-page.mdx
Author: Nguyen Huu Phuoc and original contributors
Contributors: See original repository history
Source commit: 14b481cf60dff1620ab1bb99a43b1f68068cdd9b
Copyright (c) 2020 phuoc-ng
License: MIT — https://1loc.dev/licenses/
Maintainer: Oveyon
Modifications: Reviewed, not executed, because it navigates. Original MDX retained as inert source evidence.
