English | 简体中文 | 繁體中文 | Русский язык | Français | Español | Português | Deutsch | 日本語 | 한국어 | Italiano | بالعربية

Location reload() Method

JavaScript Location  Object

reload()Method to reload the current resource, like a refresh button.

This method has an optional boolean parameter, which isfalse. If set totrueIf set, the page will always be reloaded from the server, ignoring the browser cache.

Syntax:

location.reload(forcedReload)
location.reload();
Test See‹/›

Browser Compatibility

All browsers fully support the reload() method:

Method
reload()YesYesYesYesYes

Parameter Value

ParameterDescription
forcedReload(Optional) Specify the type of reload to be performed:
  • true -Reloads the current page from the server

  • false -Reloads the current page from the cache (default).

Technical Details

Return Value:None

Related References

Position Reference:location.assign() method

Position Reference:location.replace() method

JavaScript Location  Object