[英]Is it possible to create incognito/private mode dynamically with code?
This is not a question about how to turn on incognito/private mode on a browser, but rather what kinds of things are turned on or off by browsers when that mode is entered, and whether those things can be done dynamically with (presumably) client-side code on the site itself. 这不是关于如何在浏览器上打开隐身/私有模式的问题,而是关于在进入该模式时浏览器打开或关闭了哪些类型的功能,以及这些功能是否可以通过(大概)客户端动态完成网站本身的代码。
I ask because, reason unknown, my site runs faster in incognito/private mode than otherwise. 我之所以这样问是因为,原因未知,我的网站在隐身/私有模式下的运行速度要比其他方式快。 The difference in speed is greatest in IE, which runs at a snail's pace normally, but is faster than all other browsers when my site is executed in its InPrivate viewing mode.
IE中的速度差异最大,它通常以蜗牛的速度运行,但是当我的网站以InPrivate查看模式执行时,它比所有其他浏览器都快。
My site involves complex database queries for text and image retrieval from the server, things I wouldn't ordinarily think would be sped up by incognito mode; 我的网站涉及复杂的数据库查询,用于从服务器检索文本和图像,而我通常认为不会通过隐身模式加速。 thus, I'm looking for (1) listings of the various things that browsers do when opened in that mode, and (2) what can be done code-wise (if at all) to effect those conditions when my site executes on a client's browser.
因此,我正在寻找(1)在该模式下打开浏览器时所执行的各种操作的清单,以及(2)当我的网站在某个网站上执行时,可以通过代码方式(如果有的话)执行哪些操作以实现这些条件客户的浏览器。
"Is it possible to create incognito/private mode dynamically with code?"
“是否可以使用代码动态创建隐身/私有模式?”
You can't prevent the browser from storing your navigation / download history, cache, and whatever else isn't stored in incognito mode. 您无法阻止浏览器存储您的导航/下载历史记录,缓存以及其他任何以隐身模式存储的内容。
JavaScript simply doesn't have that kind of access. JavaScript根本没有这种访问权限。
Instead of working around the problem by "forcing" incognito mode like this, it may be more productive, in the long run, to determine what's causing the site to run so slowly. 从长远来看,确定导致网站运行如此缓慢的原因可能不是更有效,而不是通过这样的“强制”隐身模式来解决问题。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.