Delete a cookie outside of palemoon

Users and developers helping users with generic and technical Pale Moon issues on all operating systems.

Moderator: trava90

Forum rules
This board is for technical/general usage questions and troubleshooting for the Pale Moon browser only.
Technical issues and questions not related to the Pale Moon browser should be posted in other boards!
Please keep off-topic and general discussion out of this board, thank you!
JujuLand
Hobby Astronomer
Hobby Astronomer
Posts: 18
Joined: 2017-04-26, 08:08

Delete a cookie outside of palemoon

Unread post by JujuLand » 2020-06-01, 14:03

Hi,

I need to open an url from a program. To correctly do that, I must remove a cookie.

Is-it possible outside of the browser, using a line command, or launching palemoon with a parameter ?

Thanks
A+

User avatar
Moonchild
Pale Moon guru
Pale Moon guru
Posts: 35478
Joined: 2011-08-28, 17:27
Location: Motala, SE
Contact:

Re: Delete a cookie outside of palemoon

Unread post by Moonchild » 2020-06-01, 18:30

No
"Sometimes, the best way to get what you want is to be a good person." -- Louis Rossmann
"Seek wisdom, not knowledge. Knowledge is of the past; wisdom is of the future." -- Native American proverb
"Linux makes everything difficult." -- Lyceus Anubite

User avatar
Lunokhod
Lunatic
Lunatic
Posts: 469
Joined: 2017-04-20, 21:25
Contact:

Re: Delete a cookie outside of palemoon

Unread post by Lunokhod » 2020-06-01, 18:32

Cookies seem to be stored in the current profiledir in cookies.sqlite and it's a binary file, so not easily manually editable. If you could script click actions (which I think is possible with some helper libs, like xdotool) then I suppose you could open the tools menu and delete the cookie as usual. Or perhaps copy cookies.sqlite, then add a blank file in it's place, do what you need with Pale Moon and replace it after closing Pale Moon later? There could be a better answer than this though!
Wait, it's all Ohio? Always has been...

New Tobin Paradigm

Re: Delete a cookie outside of palemoon

Unread post by New Tobin Paradigm » 2020-06-01, 19:34

Don't mess with core profile files like sqlite or jsom databases.

JujuLand
Hobby Astronomer
Hobby Astronomer
Posts: 18
Joined: 2017-04-26, 08:08

Re: Delete a cookie outside of palemoon

Unread post by JujuLand » 2020-06-01, 21:07

Thanks for the answers ... even it doesn't make me happy :(

A+

The Squash

Re: Delete a cookie outside of palemoon

Unread post by The Squash » 2020-06-08, 22:45

Not an elegant solution, but it is something.

I suppose what you want is to be able to open a particular URL in Pale Moon from an external script, using a command like this:

Code: Select all

palemoon https://www.florblorp.info/login.php
You might consider creating a new Pale Moon profile which is set up to not keep any cookies when the browser is shut. You can create a new profile using the command:

Code: Select all

palemoon --ProfileManager
Give the new profile a name such as "For scripting only". Then you can invoke Pale Moon from a script and request that Pale Moon use the other profile, like so:

Code: Select all

palemoon --profile "For scripting only"  https://www.florblorp.info/login.php
Now there are two caveats with that method:
  1. First, obviously this means that all cookies from that profile are cleared when the browser is shut -- not just the one you were talking about.
  2. Second, this may make Pale Moon ask you which profile you'd like to use every time you start the browser. You can remedy this by starting the browser using the command:

    Code: Select all

    palemoon --profile default

New Tobin Paradigm

Re: Delete a cookie outside of palemoon

Unread post by New Tobin Paradigm » 2020-06-09, 04:57

That's kinda a dumb idea.

User avatar
Moonraker
Board Warrior
Board Warrior
Posts: 1878
Joined: 2015-09-30, 23:02
Location: uk.

Re: Delete a cookie outside of palemoon

Unread post by Moonraker » 2020-06-09, 08:29

Off-topic:
Does anyone know what a "singleton cookie" is.I found one in a folder on my system.Im certain it did not come from pale moon.I removed it anyway and it never returned.
user of multiple puppy linuxes..upup,fossapup.scpup,xenialpup..... :thumbup:

Pale moon 29.4.1

User avatar
moonbat
Knows the dark side
Knows the dark side
Posts: 4942
Joined: 2015-12-09, 15:45
Contact:

Re: Delete a cookie outside of palemoon

Unread post by moonbat » 2020-06-09, 10:35

Off-topic:
Moonraker wrote:
2020-06-09, 08:29
Does anyone know what a "singleton cookie" is.
Think of a singleton as an object that only can have one copy of itself across the system. So the cookie must be similar - the site that set it uses only that one instance of it for whatever purpose it is for.
"One hosts to look them up, one DNS to find them and in the darkness BIND them."

Image
Linux Mint 21 Xfce x64 on HP i5-5200 laptop, 12 GB RAM.
AutoPageColor|PermissionsPlus|PMPlayer|Pure URL|RecordRewind|TextFX

User avatar
Moonchild
Pale Moon guru
Pale Moon guru
Posts: 35478
Joined: 2011-08-28, 17:27
Location: Motala, SE
Contact:

Re: Delete a cookie outside of palemoon

Unread post by Moonchild » 2020-06-09, 16:18

the question was to delete a cookie outside of Pale Moon with a command passed to it. The answer to that is No.
The whole temporary profile thing etc is a terrible crutch and doesn't even apply at all to the OP's question, so I don't know why you brought it up.
"Sometimes, the best way to get what you want is to be a good person." -- Louis Rossmann
"Seek wisdom, not knowledge. Knowledge is of the past; wisdom is of the future." -- Native American proverb
"Linux makes everything difficult." -- Lyceus Anubite

The Squash

Re: Delete a cookie outside of palemoon

Unread post by The Squash » 2020-06-11, 21:19

Moonchild wrote:
2020-06-09, 16:18
The whole temporary profile thing etc is a terrible crutch and doesn't even apply at all to the OP's question, so I don't know why you brought it up.
Let the OP decide for themselves. Sure it applies: Maybe deleting all cookies is allowable to the OP.

User avatar
adesh
Board Warrior
Board Warrior
Posts: 1277
Joined: 2017-06-06, 07:38

Re: Delete a cookie outside of palemoon

Unread post by adesh » 2020-06-12, 09:06

Cookies are stored in a sqlite database file. So deleting the cookie from outside of the browser is of course possible in the technical sense of the term, but it's not for the faint of heart and is heavily recommended against.

A workaround and hopefully a possible solution:
  1. You can get the URL from the browser when you click the link in your other program.
  2. Copy this URL.
  3. Open the URL in a private window or a new profile where the cookie won't be present.
Is that not acceptable? Are you doing this programmatically / via automation?

Locked