반응형
window.onpageshow = function(event) {
if (event.persisted || (window.performance && window.performance.navigation.type == 2)) {
}
}
pageshow
- 페이지 처음로드
- 동일한 창 또는 탭의 다른 페이지에서 페이지로 이동
- 모바일 OS에서 고정 된 페이지 복원
- 브라우저의 앞으로 또는 뒤로 버튼을 사용하여 페이지로 돌아 가기
persisted - boolean
페이지가 캐시에서 로드
웹 페이지로드는 캐시에서 경우 읽기 전용 속성을 나타냅니다.
window.performance
이거는 mdn을 봐도 모르겠다.
window.performance.navigation.type == 2
Window.performance - Web APIs | MDN
Window.performanceperformanceData = window.performance;A Performance object offering access to the performance and timing-related information offered by the APIs it exposes.BCD tables only load in the browser
developer.mozilla.org
728x90
댓글