New Chrome Incognito Window via HTML/JS [duplicate]
Asked Answered
W

2

14

Possible Duplicate:
How to open new incognito window with Javascript? (Google Chrome)

Is it possible to open a new incognito window to a URL of my choosing via either some attributes on a hyperlink or some javascript? If it is, how do I do it?

Willodeanwilloughby answered 15/6, 2011 at 19:40 Comment(0)
K
14

There's an easy way if (and only if) you're developing an extension:

chrome.windows.create({
  url: "http://www.google.com",
  incognito: true
});

It requires tabs permission in the manifest, but that's it.

Note that the above has the user consent to allowing the extension to enter incognito mode, among other tab-related permission. I can't tell 100% whether you're developing an extension -- I assume not -- but in any case that's the extension solution and there isn't one otherwise.

Kim answered 15/6, 2011 at 20:1 Comment(2)
Outdated. the windows object doesn't reachable anymore.Skintight
developer.chrome.com/extensions/windows#method-createSimplistic
T
5

Seems not. You can not force incognito from within the html/js code. You can only load the browser with

-incognito

switch to force it to incognito on load.

Tumer answered 15/6, 2011 at 19:49 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.