You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[Feature] - Delete a certain cookie instead of clear all cookies #742
Pavel Feldman (@pavelfeldman) I'm not really sure if there are many users want to manipulate the cookies but it would be nice to have an option to delete a special cookie key. Thanks!
changed the title [-][Question] - Delete a certain cookie instead of clear all cookies[/-][+][Feature] - Delete a certain cookie instead of clear all cookies[/+]on Feb 27, 2020
I was thinking about this feature - should not we try do to something like delete all cookies matching a certain set of criteria.
What would be the point of limiting the scope to delete only one cookie ?
Would be something like
Pavel Feldman (@pavelfeldman), I was looking into adding this. I am not super familiar with how playwright interfaces with Chromium, so correct me if I am wrong anywhere.
Using docs from here, https://chromedevtools.github.io/devtools-protocol/tot/Storage/, there doesn't seem to be a method for Storage to delete an individual cookie. Page and Network have relevant methods to delete an individual cookie. I don't know if those are applicable though.
The other option would be like you mentioned, delete all cookies and restore the others. This could be created and exposed to the users as a method just for convenience and would internally still use clearCookies and add/setCookies.
Any thoughts?
The other option would be like you mentioned, delete all cookies and restore the others. This could be created and exposed to the users as a method just for convenience and would internally still use clearCookies and add/setCookies.
First of all, thank you for filing this issue. We appreciate your input, in many ways Playwright is based on it. This particular feature request didn't get enough stars for us to prioritize the work on it and hence is being closed. We are a relatively small team and we need to prioritize aggressively to deliver support and new features to you.
Activity
pavelfeldman commentedon Jan 29, 2020
We could add that. The cookie would be identified by the secure+domain+path+name key. Could you share the use case for the individual cookie removal?
(You can work around it today via getting all cookies, deleting all cookies and restoring everything but one cookie in case your context is not huge)
kobenguyent commentedon Jan 30, 2020
Pavel Feldman (@pavelfeldman) I'm not really sure if there are many users want to manipulate the cookies but it would be nice to have an option to delete a special cookie key. Thanks!
PavelBansky commentedon Jan 30, 2020
peterngtr : wrong Pavel
kobenguyent commentedon Jan 31, 2020
hey man, sorry for the wrong mentioned.
[-][Question] - Delete a certain cookie instead of clear all cookies[/-][+][Feature] - Delete a certain cookie instead of clear all cookies[/+]zakuru commentedon Apr 6, 2020
Hi All, peterngtr
I was thinking about this feature - should not we try do to something like delete all cookies matching a certain set of criteria.
What would be the point of limiting the scope to delete only one cookie ?
Would be something like
nrayburn-tech commentedon Apr 24, 2020
Pavel Feldman (@pavelfeldman), I was looking into adding this. I am not super familiar with how playwright interfaces with Chromium, so correct me if I am wrong anywhere.
Using docs from here, https://chromedevtools.github.io/devtools-protocol/tot/Storage/, there doesn't seem to be a method for
Storageto delete an individual cookie.PageandNetworkhave relevant methods to delete an individual cookie. I don't know if those are applicable though.The other option would be like you mentioned, delete all cookies and restore the others. This could be created and exposed to the users as a method just for convenience and would internally still use
clearCookiesandadd/setCookies.Any thoughts?
pavelfeldman commentedon Nov 19, 2020
That would probably work.
pavelfeldman commentedon Mar 2, 2021
First of all, thank you for filing this issue. We appreciate your input, in many ways Playwright is based on it. This particular feature request didn't get enough stars for us to prioritize the work on it and hence is being closed. We are a relatively small team and we need to prioritize aggressively to deliver support and new features to you.