Comments (10)
I'm happy to announce (better late than never) that the next version of Cookie-Editor will support both import and export of netscape format!
Thanks a lot for your help @stdedos, you made it simpler for me to implement this.
from cookie-editor.
Sure, this sounds like something that could be added as an improvement.
from cookie-editor.
from cookie-editor.
Hi,
What do you mean by "make it a full cookie exporter"? I was thinking of just adding an option to the format of the export to the current feature. Would you like something more than a new format for the current cookie exporter?
from cookie-editor.
from cookie-editor.
Hi, I'm user of EditThisCookie and after some searching for firefox version I'm redirected to here. I use name=value pair format in EditThisCookie, in php file_get_contents().
So maybe add this format too as enhancement.
Regards
from cookie-editor.
Hey @Moustachauve!
Is this something still considered for the project?
Are you planning to implement it?
If not, I can try to submit a PR for it (at least the code for it; I am not sure how would the UI work)
from cookie-editor.
Hello @stdedos
As you can see, I'm not really actively working on this project recently, but PR are always appreciated. If you do make one, I can take care of the UI part of it.
I guess either a different button for different format could work if we only have two.
A more flexible way I could implement it is with a dropdown where you select the desired format and it would save the preference for future exports (default selected)
Should Import also support this format?
from cookie-editor.
I have added a small PoC code to my https://github.com/stdedos/cookie-editor/tree/feature/17-cookies-as-netscape branch.
I have isolated the (export)cookiesAs#
logic, and I've written the counterpart function for the Netscape format (more details in the commit).
The functionality can be of course a drop-down (for additional extensibility).
My original thought was that the original button would be split in two on hover (but that's just flashy for no reason, and also not future-proof).
Should Import also support this format?
Theoretically, yes - but I am not entirely sure of feature-parity 😕
I had already to fake the second field (from https://unix.stackexchange.com/a/210282/266638):
flag - A TRUE/FALSE value indicating if all machines within a given domain can access the variable. This value is set automatically by the browser, depending on the value you set for domain.
because the logic (in the extension's context) perplexes me.
if all machines within a given domain can access the variable
?!?
Wut does that even mean? If the site has set the cookie then most likely it can also read itThis value is set automatically by the browser, depending on the value you set for domain.
🤯
Others have:
- used
cookie.hostOnly
(https://github.com/rotemdan/ExportCookies/blob/master/popup.js#L73, https://github.com/lennonhill/cookies-txt/blob/master/background.js#L8), which I thing is utterly wrong - hardcoded TRUE (https://github.com/dandv/convert-chrome-cookies-to-netscape-format/blob/master/convert-cookies.js#L29)
However, http://httrack.kauler.com/help/Cookies mentions the column as Only Sent To Creator
instead of the "original" meaning (I have no indication if this is indeed the original meaning; however, the source site is the oldest reference I could find).
As far as expirationDate goes, I am not sure what to do there exactly either (applies on export too).
"Back in the Netscape days", there was no reason to "save" session cookies - you could just keep them in-memory. As such, you didn't have to write them to any file.
Adding any timestamp <= now()
means that the cookie is immediately discarded. Adding no-value "might be the best"; but what if the parser disqualifies the whole file because of one missing field / wrong line?
Others have:
- used 0 (https://github.com/rotemdan/ExportCookies/blob/master/popup.js#L76, https://github.com/lennonhill/cookies-txt/blob/master/background.js#L11), which is problematic (for the reasons described above)
- used "sentinel" value of +1d (https://github.com/dandv/convert-chrome-cookies-to-netscape-format/blob/master/convert-cookies.js#L29), which is best of both worlds - expiration is "short enough" but not too short
from cookie-editor.
This version is now available on the Chrome Web Store! It will be available soon but is pending review for Firefox, Opera, Edge and Safari.
from cookie-editor.
Related Issues (20)
- ![Screenshot_20220609-122612](https://user-images.githubusercontent.com/107188432/172838272-a4df6f66-69ab-442c-af86-d02d1f153166.png)
- cookie editor for firefox mobile version HOT 2
- Can’t load extension on safari HOT 4
- Importing Netscape-formatted cookies ignores cookie with `#HttpOnly_` flag HOT 2
- Cookie Erased when is modified
- Please add localStorage viewing/editing/deleting. HOT 3
- Cookie-Editor doesn't work on Kiwi browser HOT 7
- Cookies that cannot be displayed on the page HOT 3
- No permission to view cookies for page on Android HOT 7
- Not able to view/export all data available? HOT 6
- suggestions for better UX: no animations, buttons on top, optional ads HOT 4
- NO COOKIE DISPLAY
- “Request permission for... This site” Behaves differently in Chromium browsers and Firefox HOT 1
- Enhancement request: local storage support HOT 1
- Not working on Ios 15 HOT 1
- suggestion HOT 1
- Cookie editor not working in kiwi browser HOT 1
- Cookie-editor HOT 3
- Extension doesn't work properly in vivaldi browser HOT 2
- I want to use cookies with durations HOT 4
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from cookie-editor.