Removing a cookie from within a Chrome Extension

I want to remove a Cookie (according to some criteria) from within a Chrome Extension. According to the [documentation](http://code.google.com/chrome/extensions/cookies.html#method-remove) of `chrome.cookies.remove` it expects an object with the fields `url` (The URL associated with the cookie) and `name` (The name of the cookie to remove). Now a [cookie](http://code.google.com/chrome/extensions/cookies.html#type-Cookie) has the following fields: `name, value, domain, hostOnly, path, secure, httpOnly, session, expirationDate, storeId` but no **`url`**. How do I get the URL of a specific cookie so I can remove it? For reference one of my cookies looks like this: domain: ".google.com" expirationDate: 1364393586 hostOnly: false httpOnly: false name: "PREF" path: "/" secure: false session: false storeId: "0" value: "ID=8u"

以上就是Removing a cookie from within a Chrome Extension的详细内容,更多请关注web前端其它相关文章!

赞(0) 打赏
未经允许不得转载:web前端首页 » JavaScript 答疑

评论 抢沙发

  • 昵称 (必填)
  • 邮箱 (必填)
  • 网址

前端开发相关广告投放 更专业 更精准

联系我们

觉得文章有用就打赏一下文章作者

支付宝扫一扫打赏

微信扫一扫打赏