Pregunta

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.

¿Fue útil?

Solución

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.

Licenciado bajo: CC-BY-SA con atribución
No afiliado a StackOverflow
scroll top