Location.reload()

Location.reload() 메서드는 새로고침 버튼처럼 현재 리소스를 다시 불러옵니다.

새로고침은 SECURITY_ERROR DOMException과 함께 거부당할 수 있습니다. 이는 location.reload()를 호출한 스크립트의 출처Location 객체를 소유한 문서의 출처가 다를 때 발생합니다. 더 자세한 정보는 동일 출처 정책 문서를 참고하세요.

구문

location.reload();

명세

Specification Status Comment
HTML Living Standard
The definition of 'Location.reload()' in that specification.
Living Standard No change from HTML5.
HTML5
The definition of 'Location.reload()' in that specification.
Recommendation Initial definition.

브라우저 호환성

Update compatibility data on GitHub
DesktopMobile
ChromeEdgeFirefoxInternet ExplorerOperaSafariAndroid webviewChrome for AndroidFirefox for AndroidOpera for AndroidSafari on iOSSamsung Internet
reloadChrome Full support 1Edge Full support 12
Notes
Full support 12
Notes
Notes Before Edge 79, if a page added to Trusted Sites contains a cross-origin iframe, then calling reload() from within the iframe reloads the trusted page (in other words, the top page reloads, not the iframe).
Firefox Full support 1IE Full support 5.5
Notes
Full support 5.5
Notes
Notes If a page added to Trusted Sites contains a cross-origin iframe, then calling reload() from within the iframe reloads the trusted page (in other words, the top page reloads, not the iframe).
Opera Full support 3Safari Full support 1WebView Android Full support 1Chrome Android Full support 18Firefox Android Full support 4Opera Android Full support 10.1Safari iOS Full support 1Samsung Internet Android Full support 1.0

Legend

Full support  
Full support
See implementation notes.
See implementation notes.

같이 보기