Firefox addon how to remove the persisted data on open tab
I and sending a request using tab Like this
var pageUrl = "sitedetails.html"; tabs.on("ready", function(tab) { var worker = tab.attach({ contentScriptFile: [self.data.url("jquery.min.js"),self.data.url("CallsClasses.js"),self.data.url("aes.js"),self.data.url("crypt/sha1.js"),self.data.url("crypt/pbkdf2.js"),self.data.url("sitedetails.js"),self.data.url("commonclasees.js")] }); worker.port.emit('send_user_domain',userid,userdevicetoken,urlid,registersites,registerusers); worker.port.on('action',function(resp) { switch(resp.action) { case "update_domain": console.log("updated Domain Request"+JSON.stringify(resp.data)); update_items("registered_sites","localtime_registered_sites",resp.data,resp.urlid,resp.user_id); break; case "registered_users": console.log("registered_users Domain Request"+JSON.stringify(resp.data)); addItem("registered_users",resp.data); break; case "delete_domain": console.log("Deleted Domain Request"+JSON.stringify(resp.urlid)); delete_items("registered_sites","localtime_registered_sites",resp.urlid,resp.user_id); break; case "update_user": console.log("updated update_user Request "+JSON.stringify(resp.data)); update_items("registered_users","localtime_registered_users",resp.detailid,resp.user_id); break; case "delete_user": console.log("deleted delete_user Request "+JSON.stringify(resp.detailid)); delete_items("registered_users","localtime_registered_users",resp.detailid,resp.user_id); break; } }); }); tabs.open(pageUrl);
first time It shows Correct result. but on second time it goes for 2 requests . First is new one and second is old. As We open multiple tabs with same request. It goes for multiple request. What I want is to, whenever I open a new tab my old tab request should not be followed with new one
Novain'i cor-el t@
All Replies (1)
hi sanjeet_singh, support.mozilla.org is intended for end-user support. please put your question to the mozilla addon forums where you will probably get better answers to all issues regrading extension development: https://discourse.mozilla-community.org/c/add-ons