Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Open URL in incognito window

Tags:

javascript

I want to open a new URL in Incognito/ Private window when someone clicks on a particular link.

Is it possible through javascript?

like image 557
Nitish Avatar asked Jun 28 '18 04:06

Nitish


1 Answers

Check below

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

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

https://developer.mozilla.org/en-US/Add-ons/WebExtensions/API/windows/create#Browser_compatibility

like image 73
Sudheej Avatar answered Sep 20 '22 12:09

Sudheej