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]( 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]( 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: "" 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 答疑

评论 抢沙发

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

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