8

As a sysadmin, I frequently want to open internal web apps in incognito mode, for a variety of reasons that have nothing to do with privacy. To use a different set of credentials, perhaps. Or to prevent cross-contamination between two sessions with the same app. Or ... well, you get it, we're all running complex systems.

I would love to be able to make a link open in an incognito tab or window (ideally in all browsers, but primarily in Opera). Something like:

<a target="_incognito" href="https://were.hunting.wabbits.com">Qwiet</a>

Or:

<a href="javascript:OpenInIncognito('https://were.hunting.wabbits.com');">Qwiet</a>

Or, worst case, make a bookmark do that.

Every discussion I can find of this boils down to "You shouldn't want to do that because ... privacy!". But, of course, this isn't a privacy use case, and I really couldn't care less if a forensic investigator can find out I've been accessing these web apps. It's part of my job, after all. I just want some isolation, and I'd like to do it without opening a variety of different browsers or using multiple machines or VMs.

5

You may achieve that with the JavaScript function windows.create(), it accepts an optional incognito parameter, see MDN web docs:

incognito
Whether the new window should be an incognito (private) window. Note that if you specify incognito and tabId, the ID must refer to a private tab — that is, you can't move a non-private tab to a private window.

Example: windows.create({"url": url, "incognito": true});

Check Browser compatibility.

Edit:

Sorry, but above Solution won't work in a web page, as the windows object is not available there. It may only work for browser extensions.

  • Does this work from a web page? – Rahatur Mar 28 '18 at 3:16
  • The Webpage needs to implement above code, i.e. for the click event on a link. Ne normal link behavior needs to be disabled in that cases. – LarS Mar 28 '18 at 5:48
  • An extension/add-on is required to run the above code right? Because I think content pages has got no permission to execute the windows API directly? – Rahatur Mar 28 '18 at 8:12
  • @Rahatur You are right, I was not aware that the windows object is not accessible/available on a web page. When I posted the answer I haven't had time to test it. Now I wanted to implement it (i.e. <a href="#" onClick="windows.create({'url': 'http://example.com'}); return false;">Test</a>), but found that it don't work – as you said. I get the error "ReferenceError: windows is not defined". – LarS Apr 1 '18 at 16:47
2

You could create a desktop shortcut and use the -incognito flag and the web address to get it done, as per the following page:

https://www.tekrevue.com/tip/incognito-mode-shortcut/

This is a bit worse than the "worst case" you outlined, but if you'll be testing the same pages repeatedly, it might not be so bad.

  • Yeah, that's worse-than-worst :-) But it's a viable option, thanks! – Ross Patterson Nov 21 '16 at 16:29
2

According to this stackoverflow answer it is impossible

https://stackoverflow.com/a/16148152/6820123

And because you don't want it because of privacy reasons, this is the reason why browsers have no such function. Browsers are made for the masses and there is a bit security and privacy way more important than a insecure function for a very special use case.

  • Meh. Until browsers automatically use Tor for incognito mode, the "privacy" offered is just an illusion. We're so far past "don't store cookies and history" it isn't funny. Facebook, Amazon, Home Depot, et al. track you by IP address. – Ross Patterson Nov 21 '16 at 16:24

Your Answer

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Not the answer you're looking for? Browse other questions tagged or ask your own question.