electron-webview-quick-start icon indicating copy to clipboard operation
electron-webview-quick-start copied to clipboard

how can i use 2 or 3 webviews in one project with different cookies?

Open jianqi-jin opened this issue 5 years ago • 3 comments

how can i use 2 or 3 webviews in one project with different cookies?

jianqi-jin avatar Mar 31 '19 14:03 jianqi-jin

We can access and modify/clear cookies, and official docs reference is here: https://electronjs.org/docs/api/cookies

Other refs:

ayqy avatar Apr 01 '19 12:04 ayqy

You can use different partitions on every webview tag partition="persist:github". Cookies are accessible everywhere in the project by partition name. When using another webview, ensure that partition attribute for another session is removed. https://www.electronjs.org/docs/api/webview-tag#partition

OlgaSukhoverkhaya avatar Jan 24 '20 06:01 OlgaSukhoverkhaya

You can use different partitions on every webview tag partition="persist:github". Cookies are accessible everywhere in the project by partition name. When using another webview, ensure that partition attribute for another session is removed. https://www.electronjs.org/docs/api/webview-tag#partition

hey there, so I can just use the same url(tag src) on a couple webviews ,and set different partition to set different cookies? yeah, I get there, thk

jianqi-jin avatar Feb 06 '20 08:02 jianqi-jin