“Cookies are small text files” – what? (2009)
shallowsky.com
shallowsky.com
I can imagine their rant upon finding a text that describes a telephone as a desktop device connected to the telephone network with a wire. "What kind of fool would describe a cellular data connection as a wire?"
Those that fail to learn from history are doomed to look really silly.
Not really. The need to "save" is becoming less and less relevant. All changes are synced with the cloud and stored immediately. Even in some programming IDEs the need to save is a lot less common.
An optimistic outlook, to be sure. Many Dropbox, iCloud, AWS, etc. users who've been burned by their experiences might beg to differ.
> A “cookie” is a piece of information sent to your browser by a website you visit. Cookies can be stored on your computer for different periods of time.
I believe the author does realize that:
> at least, I'm guessing IE must implement cookies using separate small files, or must have done so at one point
Netscape used to store cookies similar to curl in a single file, one cookie per line. IE was the only browser (AFAIK) that stored cookies in individual text files, and somehow that became canon. So I don't think it's correct in general to say "cookies used to be text files".
IE had 90%+ market share for 4 years.
If you store a jpeg file in a database, is it no longer a jpeg file?
The word "file" has a very broad definition. HTTP/0.9 itself could be accurately described as a protocol for sending a text file as a query and receiving one in response. A basic HTTP client can be implemented by reading and writing files into netcat.
The entire HTTP header is a text file.
That's... not the point of the article? The point is that whether they're stored on a text file, in a sqlite database or on the blockchain is an implementation detail that tells the user nothing about what a cookie actually is and what it is for.
Standard practices among browsers have changed, and your typical modern user of a computing device is no more savvy to techno-speak than a coconut can comprehend Etruscan.
The explanation is dated and needs to be retired; that's no reason to go after it with such vitriol.
Discarding a constructive mental model like this for the sake of pedantry — especially when it makes the idea described harder to understand — is just stupid.
And so, it follows that this article is just stupid.
The article was right at the time of writing, and it's even righter today.
At least in Internet Explorer 3 and Netscape Navigator, cookies were stored as individual files in the file system. In that sense at some point in time it was somewhat correct.
However the relevant part: On e in a time computer users knew files and we're working a lot with them. Operating systems like Windows 95 pushed files into the front (instead of first picking the program and in the program opening the thing they pushed Explorer to "explore the computer" and then finding the right program for the file) There a file was a understandable unit of data.
What would you define a DNS TXT record as? Technically speaking.
> you'd expect them to be human-readable, but they're not
humans are sorta ok at making data readable
They just prioritize that over any of the details or useful terminology to actually explain what they did or how this thing relates or builds off something that already exists.
Everyone's so worried about getting as many new tech keywords thrown out as they can in order to gatekeep others. Even when communicating to other devs-- I realize some of these sound like they're aimed at non-tech people. These are not out of place statements on Stack Overflow or in YouTube tutorials.
"The Cloud is a revolutionary technology that you be will literally unable to comprehend unless you have these 20 certificates like me." But then it can just be summarized as saving and accessing a file on someone else's computer.
"Typescript is a literally brand new technology built from scratch that you cannot begin to comprehend until you put 10k hours into it and become a master like me." But then it's just JavaScript with extra steps. Just like every other main front end language. They're all JavaScript plus X.
"I built my own computer and then operating system from scratch. Why don't you try the same before suggesting your ideas." Well, you ordered pre-assembled parts from a list somebody else wrote and then you plugged them in with less steps than a Lego kit. And your OS from scratch was just a GUI checkbox installer than you clicked through that now has a thousand driver errors you neglected to mention.
"I passed my FAANG leetcode interview because I'm a better programmer than you. If you can't pass a leetcode interview, are you even trying?" You passed your leetcode interview because you spent hundreds of hours memorizing every question and answer in order to recite it from memory under pressure. You also got lucky by getting a question you happened to memorize. Memorizing the answers before a test doesn't make you better at that subject.
etc.
I honestly can't find a way to explain this that's not negative. If someone can rephrase my points, I would be curious to hear a respectful counter argument.
https://i.imgur.com/YeGGd4B.png
https://www.squarefree.com/2004/07/24/cookies-are-no-longer-...
There's zero content of substance here, just a petty semantic argument and a generally degrading attitude towards users.
Cookies are chunks of text, calling that a file, even if it is stored as part of another file doesn't seem wrong, if perhaps it isn't the best way to describe it.
A private key is a text file, a token is a text file, a host name is a text file, a password is a text file, a registry key is a text file ... the term loses all meaning.
https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Se...
> "In PyBlosxom everything is a text file."
(For the pilots, I know about pireps. That’s part of the analogy. ;)
I've spent so much time helping young programmers debug their code trying to read/parse those files. They get an error about an unexpected character at the start of the file but when they open it they only see normal text so they assume they're doing something wrong.
It doesn't really matter if user understand how file in computer works or not. You still get the same conclusion even you think them as physical file.
I give you a piece of paper, and you give me back when you come again. What's wrong with that?
If you give me a piece of paper folded into a hat, do you get the hat back from me? Not if what we mean by "a piece of paper" is "the information contained in the writing on a piece of paper where each number corresponds to a particular symbol in a table".
This part is also not the truth. The data on paper can be as simple as a serial number and valid signature. Take a real world example: concert ticket. Or digital example: jwt ticket.
The paper with "something you don't care but they know" is a proper description in my opinion.
A "cookie" is a piece of information sent to your browser by a website you visit, and your browser is required to send that information back to the website when you encounter that website's content (visible or hidden) throughout the web. Sending this information back to the website also informs the website of where you were on the web at that time.
As of 2009 it was difficult to disable 3rd party cookies.
So many things would get a lot easier if there was an optimization for storing many tiny files without extreme SSD wear from deleting and recreating, or space amplification.
A directory could be marked as database-like, and all your browser stuff could be regular old folders and files, syncable with SyncThing if they let you choose an accessible folder on mobile.
It was straight copy & paste from what you'll find on half of all websites, with the earliest match going back to < 2000s - over 20 years old. GDPR/DPA made waves of updates at some point but large portions remain the same.
I have a mildly differing opinion. Are not all files, by default, text files? It is just the way the text inside them is structured that determines their actual format?
edit: I might be opening a can of worms here, because I have a suspicion people will start pointing to extensions and whatnot.
Try opening a non-text file (e.g. an executable) in a text editor — the editor will probably try to interpret the file as Latin-1 text, but this will just look like garbage, and can’t really be said to be a sane representation of the contents of that file.
Now then, if you want to discuss how most modern (non-executable) file formats are just zip files, then we can have more fun.
A database file can contain text, but it isn't a text file in and of itself.
No. Text files describe a particular record format. In ASCII, records are 1 byte long and always have the MSB set to zero.
The unicode record format is more complicated, but it also has a clear specification.
Files not in these formats are not text files.
For example, a file of raw audio samples doesn't contain any text. (You could interpret it as text in some code page if (unlike e.g. ISO 8859-1) all bytes are valid in that code page, but you'd end up with nonsense.)
An SQLite file definitely contains text, but also other things, so it's not "plain text". If "text file" means a file consisting entirely of text, and nothing else, it's not a text file.
Thank you everyone. It feels like today I re-learned something I misunderstood a long time ago.
https://apple.stackexchange.com/questions/364789/why-isnt-a-...
It essentially _is_ that simple, it’s just how you interpret those 1s and 0s. Say you try to interpret a PNG file as text: you get some representation of the 1s and 0s in that file, just not the right one.