1 points · by cswangpeng · 11y ago · 6 comments
window.onbeforeunload = function () { sessionStorage.setItem('refresh', true); };
var isRefreshingPage = function () { var oldState = sessionStorage.getItem('refresh'); sessionStorage.setItem('refresh', false); return oldState == 'true'; };
Also, what happens when someone has 2 tabs open with the app, closes one and tries to do some action in the other?
Edit: What I really want to ask is... why is this ever necessary?