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?
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?
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);
}