ElectronJS: how to manipulate cookies from rendered Process(browser window)?
<p>I am able to create persistent cookies from main process (app.js)</p>

<p>code:</p>

<pre><code>const session = require('electron').session;
    const ses = session.fromPartition('persist:name');

    debugger;
    // Query all cookies associated with a specific url.
    ses.cookies.get({}, (error, cookies) =&gt; {

        console.log(cookies); /// cookies values should be printed next time the applciation is launched.
    });

    // Set a cookie with the given cookie data;
    // may overwrite equivalent cookies if they exist.
    const cookie = {
        url: 'http://www.github.com',
        name: 'dummy_name',
        value: 'dummy',
        expirationDate: 2093792393999
    };
    ses.cookies.set(cookie, (error) =&gt; {
        debugger;

        if (error)
            console.error(error);
    });
</code></pre>

<p>But when I am doing the same in Browser window, cookies are not being created and the <code>session</code> is undefined.</p>

<p>Please suggest what should I do to save persistent data in the browser.</p>