为每个窗口分开会话 [英] Separate session for each window

查看:112
本文介绍了为每个窗口分开会话的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想创建一个扩展,每个chrome窗口都有自己的会话。我们之前使用过隐身模式,但问题在于,虽然主窗口和隐身窗口具有单独的会话,但会话在各种隐身窗口之间共享。

有没有什么方法可以配置chrome在每次打开隐身窗口时使用单独的会话?

解决方案

您的目标是使用新的用户数据目录启动Chrome实例。 Cookie将在每种情况下被隔离。
在扩展中实现一种与cmd上的命令实现相同目标的方式:

  chrome.exe  - -user-data-dir =C:\temp\user1


I am trying to create an extension where each window of chrome has its own session. We used incognito earlier, but the problem is that while the main window and the incognito window have separate sessions, the session is shared between the various incognito windows.

Is there any way of configuring chrome to use a separate session every time an incognito window is opened?

解决方案

Your goal will be start a Chrome instance with a new user data directory. The cookies will be isolated in each instance. In the extension to implement a way to reach the same goal as this command on cmd:

chrome.exe --user-data-dir="C:\temp\user1"

这篇关于为每个窗口分开会话的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆