프로그래밍
JAVASCRIPT
페이지 이동 감지 관련
window.onpageshow = function(event) {
if ( event.persisted || (window.performance && window.performance.navigation.type == 2)) { // 뒤로가기 시
alert('뒤로가기 함');
}else if(performance.navigation.type == 1){ // 새로고침
alert('새로고침 함');
}
}