25

In some case, a user might not want the chrome custom tab to show up in their browsing history. Is there any way the app could tell the Chrome Custom Tab to display the webpage in incognito mode, and avoid storing that URL in the user normal browsing history?

If that's currently not possible, where could someone submit a feature request for that?

Thanks!

m-p-3
  • 351
  • 4
  • 6
  • 1
    It is not currently possible to open a custom tab as incognito in Chrome. There is a handy link to report customtabs bugs so that they are visible to relevant developers. The link is mentioned in the readme to official examples on github: https://github.com/GoogleChrome/custom-tabs-client – Egor Pasko Jun 02 '16 at 18:27
  • Any solutions as of yet? – A P Jun 16 '17 at 10:44
  • 1
    Any solution yet? – Manmohan Badaya Aug 10 '17 at 09:28
  • OP here, maybe this could be relevant to others: https://www.xda-developers.com/google-chrome-incognito-custom-tabs/ – m-p-3 Oct 11 '19 at 15:03

1 Answers1

1

It is possible now. For example in C#:

try
{
    string dataFolder = "C:\userFolder"; // If you need to maintain your browser session, you can configure a user data directory
    string urlToOpen = "https://shalliknow.com"; // replace your url to open
    Process process = new Process();
    process.StartInfo.FileName = @"C:\Program Files (x86)\Google\Chrome\Application\chrome.exe";
    process.StartInfo.Arguments = $"--new-window={urlToOpen} --start-maximized --incognito --user-data-dir=\"{ dataFolder}\""; // SSH new Chrome
    process.Start();
}
catch (Exception ex)
{
    Console.Writeline("Exception while opening link in browser");
}

The source of this code, as well as a list of command line arguments for chrome.exe can be found here: https://shalliknow.com/articles/en-scs-how-to-open-chrome-in-incognito-mode-programmatically-in-csharp

SymboLinker
  • 884
  • 6
  • 15