Reputation: 1845
When clicking a link in Firefox 10, the document.readyState == 'complete'
until the request from the server actually returns.
Is there a cross-browser way to check if there is a request in progress or not by looking at the current document?
Upvotes: 1
Views: 357
Reputation: 707308
If this clicking a link is going to a new page, a new document is created to load the page into so you won't ever see a status change on the current document other than an onunload handler.
You can see when your document is being unloaded with window.onunload. There are some browser differences in implementation as this is not a standard's-backed feature, but it does work in modern browsers.
Upvotes: 1