location.reload() Reload the page
Last updated: 2026-09-09
location.reload() Reload the page
reload reloads the current page. Pass true to force a server reload.
| Category | Browser (BOM) |
|---|---|
| ES version | DOM |
📝 Syntax
location.reload();
⚙️ Parameters
| forceGet | Optional. true forces a server reload. |
|---|
Returns:undefined.
Mutates the original:Yes (in place)
▶ Example
Edit the code, press Run, and see the result in the output panel:
Output:
(page reloaded)
💡 Tip reload interrupts JS execution — call at the right time.
ℹ️ info Same effect as pressing F5.
🌐 Browser support
| Browser | |||||
|---|---|---|---|---|---|
| location.reload() | ✓ v1 | ✓ v12 | ✓ v1 | ✓ v1 | ✓ v1 |
| Supported by all modern browsers | |||||
🏷️ Related Items
💡 Related Cases
More case studies coming soon — check back later.
📚 Related Tutorials
❓ FAQ
Qreload(true) vs reload()?
Areload(true) forces server load; reload() may use cache.
QWill data be lost?
AAll JS state is lost — persist to localStorage or server.
QHow to update without reload?
AUse fetch + DOM manipulation — the SPA approach.