I have a chrome packaged app, in which I use WebViews to open external content.

What I would like to achieve is to be able to log in with two different users in a webapp (that uses cookies for storing sessionID).

The problem is that the two WebViews seem to share the cookies among themselves.

I've searched through the documentation and internet but couldn't find any clues on how to separate cookie-spaces, or if that is even possible?

My guess would be it is not possible, since chrome itself can only run two sessions in parallel (normal & incognito), but I would really be interested to know it for sure, + maybe the reasons behind it.

有帮助吗?

解决方案

The <webview> element has an attribute partition that achieves exactly what is required: you can have separate local browser states, persistent or not, possibly shared between several instances.

许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top