Skip to content

Instantly share code, notes, and snippets.

@dstyle0210
Created August 1, 2019 04:41
Show Gist options
  • Select an option

  • Save dstyle0210/d0604ac3143fca17de54524c9f4c5ab1 to your computer and use it in GitHub Desktop.

Select an option

Save dstyle0210/d0604ac3143fca17de54524c9f4c5ab1 to your computer and use it in GitHub Desktop.
뒤로가기 버튼을 통한 접근 체크 ( BFcache 제거하기 )
// 뒤로가기(type == 2)을 체크해서, 새로고침 처리한다.(BFcache 제거하기)
if(window.performance.navigation.type == 2){
setTimeout(function(){ // 임의 async을 위해 setTimeout 추가.
document.location.reload();
},10);
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment