Currently I am using window.stop(); but it is slow, some things still get processed. I would like to stop the tab before any content is loaded and start an XMLHttpRequest.
Example:
window.stop();
var req = new XMLHttpRequest();
req.open('GET', document.URL, true);
req.onprogress = function() {
//stuff
};
req.send(null);
I was thinking I could use onBeforeRequest but since I am trying to load the same page it would just turn into an infinite loop.