admin管理员组文章数量:1201801
I need to delete gmail cookies set in my chrome browser, using chrome extension , but it can delete all cookies other then Gmail cookies, then I noticed that Gmail cookies are httponly, Is there a way to remove them using javascript chrome extension..
Thanks :)
I need to delete gmail cookies set in my chrome browser, using chrome extension , but it can delete all cookies other then Gmail cookies, then I noticed that Gmail cookies are httponly, Is there a way to remove them using javascript chrome extension..
Thanks :)
Share Improve this question edited Jan 30, 2016 at 14:24 Priyanka asked Jan 25, 2016 at 13:12 PriyankaPriyanka 8362 gold badges9 silver badges22 bronze badges3 Answers
Reset to default 22Chrome extensions can use chrome.cookies
API, that has access to all cookies in the cookie store, including httpOnly
.
The documentation for the API is here.
Note that this API requires declaring a permission and will not work from content scripts.
This one works absolutely fine for deleting every cookie, even if it is httponly
chrome.cookies.getAll({'domain':'accounts.google.com'},function(cookie){
for(i=0;i<cookie.length;i++){
var prefix = "https://";
var url = prefix + cookie[i].domain + cookie[i].path;
chrome.cookies.remove({'url':url , 'name':cookie[i].name},function(cookie){ });
}
});
The point of HTTPOnly cookies is not let javascript to access them. So basically you can not read them. If you want to delete them you can do it from the options that offers browser
本文标签: javascript Chrome Extension Not able to read httponly cookiesStack Overflow
版权声明:本文标题:javascript Chrome Extension Not able to read httponly cookies - Stack Overflow 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1738592565a2101597.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论