3

Starting a new Chrome session via new Process() / commandline is quite slow, but blazing fast if done in Incognito mode. Further tabs opened after the first are much faster if the first window remains open, unfortunately the most common use-case by far is "open once and close it after". Unfortunately, I rely on localStorage to store information between sessions, and so cannot use Incognito mode as-is.

I would like to get some/most of Incognito mode's fast startup/loading, without actually using incognito mode in a Chrome session opened from command line.

Alternately, a way to enable localStorage while using Incognito mode, but I figure that even if there were a way to do this, it'd be (at best) a hack, since it runs counter to the whole point of Incognito.

I am running some local webapps (all built with the Phaser framework), and launched from a C# app via new Process() - see code below.

I've tried a number of command line additions from various sources, but none seem to make any meaningful difference.

I've tried all of the following:

" --disable-plugins";
" --disable-plugins-discovery";
" --disable-extensions";
" --disable-preconnect";
" --disable-translate";
" --dns-prefetch-disable";
" --bwsi";
" --force-dark-mode";
" --user-data-dir=c:\\custom\\userdata\\dir";
" --no-first-run";


string cmd = "C:\\Program Files (x86)\\Google\\Chrome\\Application\\chrome.exe";
            string args = localWebServer + "path/to/app.html";




using (Process myProcess = new Process())
{
  myProcess.StartInfo.UseShellExecute = false;
  myProcess.StartInfo.FileName = cmd;
  myProcess.StartInfo.Arguments = args;
  myProcess.StartInfo.CreateNoWindow = false;
  myProcess.Start();
}

Results / what I see: "Normal mode" - browser opens fairly quickly, loads Phaser.min.js, then hangs for 3-10 seconds (stuck on loading bar), and only then proceeds to load rest of app.

"Incognito mode" - browser opens, and blazes through the loading process in 1-2 seconds.

1
  • Why the downvote? I would like to know how to improve the question, or what is wrong with it. Anonymous downvotes won't help me improve.
    – MPF
    Commented Oct 23, 2019 at 8:59

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Browse other questions tagged or ask your own question.