javascript - Disabling/blocking/deleting cookies from specific website not working -


good day!

i've been trying delete cookies specific website in chrome extension, can view in incognito mode. i've been following guides , reading documentation, can't work:

manifest.json:

{   "manifest_version": 2,   "name": "a name",   "version": "1.0",   "description": "some description",   "browser_action": {       "default_icon": {         "19": "images/icon19.png",         "38": "images/icon38.png"       },       "default_popup": "mypopup.html"   },   "permissions": [     "cookies",     "https://*/",     "http://*/"   ],   "background": {     "scripts": ["js/example.js"]   } } 

example.js:

chrome.cookies.getall({domain: ".example.com"}, function(cookies) {     for(var i=0; i<cookies.length;i++) {       console.log(cookies[i]);        chrome.cookies.remove({url: "https://" + cookies[i].domain  + cookies[i].path, name: cookies[i].name});     }   }); 

this how see it. site cookies come https://www.example.com. cookie permissions site added in manifest. background provides path script want run (path correct). in example.js, using chrome.cookies.get loop through cookies, deleting them. cookies still there when load plugin , refresh page.

what did miss here? there way this? or maybe better way block cookies name?

any help/tips appreciated.

kind regards, mo

edit: want site not remember me cookies. method of blocking/deleting/denying/whatever good.


Comments