0

Is it possible to force a JavaScript to run using code (c#) in Chrome Incognito?

Cause when I tried to run certain JS in normal Chrome, it works normally. But once I switch to Chrome Incognito, the JavaScript is no longer working.

*Note: I do not want to make changes to settings in Chrome

Zorev Gnoz
  • 221
  • 4
  • 20
  • no longer working in what way? Error in the console? Doesn't even load into the page? something else? as for forcing it in `C#` ... `C#` is server side, so you can't control a browser from server side – Jaromanda X Sep 23 '20 at 03:58

1 Answers1

0

You can't control the browser from the server side, but you may do that in the client's side with the JavaScript function windows.create(), it accepts an optional incognito parameter, see MDN web docs.

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