Closed sadym-chromium closed 8 months ago
I think we can do filtering based on domain/path in Puppeteer. I think it would be better behavior for Puppeteer users.
To expand on it, the current behavior might return cookies that are present in storage but the browser decides to exclude them for an URL due to some reason (reason is never reported). Also, I believe it would return expired cookies which kind of undoes the URL check if think of it as a question on whether the browser will choose to include the cookie in a given request.
The cookie can be sent or not in the specific request depending on the request itself, so it's not feasible to implement this filter in storage
domain. If the user wants to make sure if the cookie is sent, they have to check it out in the network.BeforeRequestSent
event.
Currently, there is no way to get cookies will be provided for the given url, but this API seems reasonable and is required by Puppeteer.
In order to enable this scenario, consider extending
storage.getCookies
filter withurl
.