c# FB设置缓存后,重新打开浏览器,缓存没有生效,是什么原因呢?
FBroSharpInitSet set = new FBroSharpInitSet{
//设置缓存目录
cache_path = Directory.GetCurrentDirectory() + "\\Cache\\CachePath\\",
//设置用户目录
user_data_path = Directory.GetCurrentDirectory() + "\\Cache\\UserPath\\",
//设置根缓存目录,必须是上面缓存目录的父目录,否则采用独立缓存可能会失效
root_cache_path = Directory.GetCurrentDirectory() + "\\Cache\\",
//启用事件消息循环
multi_threaded_message_loop = true,
//设置执行子进程,不设置他会默认以当前进程作为子进程
//browser_subprocess_path = Directory.GetCurrentDirectory() + "\\FBroSubprocess.exe",
//本地化语言
locale = "zh-CN",
log_severity = FBroSharpLogSeverity.DISABLE
};
这样设置,浏览器登录后,再次打开浏览器还是要登录
mosheng 发表于 2025-2-17 14:47
查看文档,在关闭浏览器的时候刷新下Cookie
{:6_335:}, 浏览器关太快了!! 查看文档,在关闭浏览器的时候刷新下Cookie
C#的刷新cookie写法
if (BtnText == "刷新cookie")
{
FBroSharpCookieManager manager = FBroSharpCookieManager.GetGlobalManager();
manager.FlushStore();
//FBroSharpCookieManager.GetGlobalManager().FlushStore();
MessageBox.Show("刷新cookie成功");
}
页:
[1]