1

I started working with geckofx and implemented a simple browser with tabs. My question is how do I manage to give each tab a separate cookie/session id?

Edit: Or is it possible to create a new instance of the browser with new cookies?

Termininja
  • 6,620
  • 12
  • 48
  • 49
Tiaesstas
  • 31
  • 4

1 Answers1

1

Solution: If a Siterefresh is not intended, this works good: Is that possible ? GeckoFX can use seperate CookieContainer per instance?

Following the code you put in and let visual studio complete the interface implementation.

[Guid("c375fa80-150f-11d6-a618-0010a401eb10")]
[ContractID(CookieServiceFactory.ContractID)]
public class CookieServiceFactory : GenericOneClassNsFactory<CookieServiceFactory, CookieService>
{
    public const string ContractID = "@mozilla.org/cookieService;1";
}
public class CookieService : nsICookieManager2
{
    private static nsICookieManager2 _cookieService;

    static CookieService()
    {
        _cookieService = Xpcom.GetService<nsICookieManager2>(Contracts.CookieManager);
    }
Community
  • 1
  • 1
Tiaesstas
  • 31
  • 4