Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

setting cookies for firefox programatically

0 views
Skip to first unread message

Kapil

unread,
Aug 17, 2006, 7:07:19 PM8/17/06
to
Hi,

I want to set a cookie for firefox from my c/c++ program on windows for a
specific website.

I am able to do the same in cookies.txt file but It works only if Firefox is
closed before updating this file and Started firefox after updating the
cookies.txt.

but not if any instance is running. please let me know if there is any way
of doing it.

thanks in advance
kapil


Niky Williams

unread,
Aug 18, 2006, 10:41:11 AM8/18/06
to Kapil

Take a look at the nsICookie interface on www.xulplanet.com (appears to
be down at the moment), maybe that is what you are looking for?

Niky Williams

Nickolay Ponomarev

unread,
Aug 25, 2006, 12:54:42 PM8/25/06
to Kapil, dev-em...@lists.mozilla.org
On 8/18/06, Kapil <kap...@gmail.com> wrote:
> I want to set a cookie for firefox from my c/c++ program on windows
> for a specific website.
>
First, please don't cross-post unless it's appropriate (and your
crosspost to dev-mdc was not) and if you do cross-post, send a single
message to several groups/mailing lists and set followup-to.

There are no interfaces to control Firefox like that from an outside
program. The usual workaround is to write an extension that gets
installed to user's Firefox then talks to your C++ program somehow
(e.g. sockets) and does the necessary manipulations using the internal
API. The extension will probably want to use the cookie manager
(nsICookieManager/nsICookieManager2).

Nickolay

0 new messages