I am sending a xmlhttprequest from my google chrome ui after a button is pressed in the popup.html. This code works fine as long as the popup.html remains open. But the moment the popup.html closes(bu clciking the mouse outside popup.html area) the xmlhttprequest automatically aborts and stops. This causes my program to stop execution. I want to know if there is any way in which i can continue the xmlhttprequest even if the windows gets hidden and loses focus.
Share
Your AJAX request should be done by a background script. Execution of this script can not be stopped easily by the user.
You should modify your extension like this: