Developer Tool – Storage: Edit Cookie, Local Storage… Topic is solved

Talk about code development, features, specific bugs, enhancements, patches, and similar things.
Forum rules
Please keep everything here strictly on-topic.
This board is meant for Pale Moon source code development related subjects only like code snippets, patches, specific bugs, git, the repositories, etc.

This is not for tech support! Please do not post tech support questions in the "Development" board!
Please make sure not to use this board for support questions. Please post issues with specific websites, extensions, etc. in the relevant boards for those topics.

Please keep things on-topic as this forum will be used for reference for Pale Moon development. Expect topics that aren't relevant as such to be moved or deleted.
zcyzcy88

Developer Tool – Storage: Edit Cookie, Local Storage…

Unread post by zcyzcy88 » 2017-06-08, 07:49

Why can't edit them?

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

Re: Developer Tool – Storage: Edit Cookie, Local Storage…

Unread post by Moonchild » 2017-06-08, 11:27

zcyzcy88 wrote:Why can't edit them?
Because it's not a storage editor. It's a storage viewer. Devtools are present to help you develop and debug site code; being able to view storage will help writing proper site code. Editing storage values manually won't help, and as such it's a viewer.
"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

zcyzcy88

Re: Developer Tool – Storage: Edit Cookie, Local Storage…

Unread post by zcyzcy88 » 2017-06-08, 12:24

Moonchild wrote:Editing storage values manually won't help, and as such it's a viewer.
Well, but DevTools is not only for web-page developers, also for power users / hackers / add-on developers.
It is needed and helpful when I sometime need hack, and I don't want to use Firebug or other add-ons.

By the way, is it difficult to implement this feature?

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

Re: Developer Tool – Storage: Edit Cookie, Local Storage…

Unread post by Moonchild » 2017-06-08, 13:25

used by != created for. Extension devs normally won't need this on-the-fly data editing either, because it's still not going to fix their scripting :)

So that leaves... power users who want to hack data?
Can you give an example where this is both helpful and needed?

PS: "I don't want to use extensions" is not an argument when using a browser that is, at its core, lean on purpose so people can extend it as they need.
"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

zcyzcy88

Re: Developer Tool – Storage: Edit Cookie, Local Storage…

Unread post by zcyzcy88 » 2017-06-08, 14:04

My case:
I can edit via console, but can't edit httpOnly cookies.

Code: Select all

document.cookie = "XXX";
localStorage.XXX = "XXX";
Other case:
- Try to delete part of cookies to test how server handle it (test server software)
- Some web-app use localStorage to save setting, I want copy it to backup, paste it to restore

And, further according to your logic, DOM Inspector should also not editable. (double standard)

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

Re: Developer Tool – Storage: Edit Cookie, Local Storage…

Unread post by adesh » 2017-06-08, 14:37

zcyzcy88 wrote:- Try to delete part of cookies to test how server handle it (test server software)
- Some web-app use localStorage to save setting, I want copy it to backup, paste it to restore
If you want to play with requests and test server side handling, it might be better to use an application suited for that, e.g. Postman - https://www.getpostman.com/
You can always export a request as cURL from Pale Moon, import it in Postman and play as you wish.

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

Re: Developer Tool – Storage: Edit Cookie, Local Storage…

Unread post by Moonchild » 2017-06-08, 16:23

zcyzcy88 wrote:And, further according to your logic, DOM Inspector should also not editable. (double standard)
Incorrect. Editing the DOM and CSS is important to be able to see the immediate layout results in the web page. Not so for cookies and storage.

Please stop making every "wontfix" a fight. There are good reasons why certain things are implemented a certain way. If you want to offer enhancements to them is one thing, making demands to cater to your specific workflow is another. See viewtopic.php?f=13&t=5647
"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

GMforker

Re: Developer Tool – Storage: Edit Cookie, Local Storage…

Unread post by GMforker » 2017-06-08, 16:42

zcyzcy88 wrote:Why can't edit them?
...and because no one added it to Pale Moon.

See also:
https://bugzilla.mozilla.org/show_bug.cgi?id=1031192

zcyzcy88

Re: Developer Tool – Storage: Edit Cookie, Local Storage…

Unread post by zcyzcy88 » 2017-06-08, 18:17

The reason & case is said before.
It is even OK if Pale Moon have no build-in DevTools, but a non-editable DevTools is really out of common knowledge.

If have no time to implement, "backlog" instead of "wontfix".

[hr][/hr]
GMforker wrote: ...and because no one added it to Pale Moon.
See also: https://bugzilla.mozilla.org/show_bug.cgi?id=1031192
Good "reason". Surprise. :problem:
Off-topic:
Moonchild wrote:Please stop making every "wontfix" a fight.
If you tag a "wontfix", I must clearly get the reason, discuss is not fight.
Even you think I "fight", I "fight" twice, not every.

zcyzcy88

Re: Developer Tool – Storage: Edit Cookie, Local Storage…

Unread post by zcyzcy88 » 2018-08-19, 18:49

Since the DevTools have been given a refresh (followed the upstream), this case is solved.

Locked