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前端其它相关文章!