问题
How to identify a tab is reloading, I mean actual page reload?
I see chrome.tabs.onUpdated event
, but for this event status is 'loading' even in case of AJAX calls from a webpage.
How can I detect a page is getting reloaded ?
回答1:
You are right, looks like not possible to recognize AJAX and page reload calls. As workaround you could listen for onunload event for tab webpage. You probably need to check if tabid and url were not changed after that.
But do you really need to know if page reloaded?
来源:https://stackoverflow.com/questions/23333771/how-to-identify-a-tab-is-reloading-i-mean-actual-page-reload