News for hackers. Stuff that matters.
Re:“Cookies are small text files” – what? (2009) by CommieBobDole on Saturday August 06, 2022 @11:47AM (#32369106)
It's interesting that the author writes this whole rant about the stupidity of describing cookies as "small text files" and how that's a ridiculous and incorrect abstraction, without realizing that cookies used to be exactly that, for a very long time, and putting them in a sqlite database is a relatively recent idea, especially at the time that this was written.

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.

Re:“Cookies are small text files” – what? (2009) by wfleming on Saturday August 06, 2022 @12:22PM (#32369404)
Additionally, at the time the “small text files” description appeared, your average computer user was much more familiar with “files” than “data”. Everyone was still mostly using desktop apps and managing their own files in folders and floppy disks, the cloud wasn’t a thing and the web wasn’t really an app platform yet. At the time, I think “data” (the article’s suggested change) would have read as more opaque and technical than “file”.
Re:“Cookies are small text files” – what? (2009) by mr_mitm on Saturday August 06, 2022 @02:20PM (#32370366)
As an additional data point, this the exact phrasing that ycombinator.com/legal uses:

> 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.

Re:“Cookies are small text files” – what? (2009) by klez on Saturday August 06, 2022 @02:00PM (#32370210)
> It's interesting that the author writes this whole rant about the stupidity of describing cookies as "small text files" and how that's a ridiculous and incorrect abstraction, without realizing that cookies used to be exactly that,

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.

Re:“Cookies are small text files” – what? (2009) by mr_mitm on Saturday August 06, 2022 @12:36PM (#32369545)
> without realizing that cookies used to be exactly that

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".

Re:“Cookies are small text files” – what? (2009) by dehrmann on Saturday August 06, 2022 @01:14PM (#32369825)
> somehow that became canon

IE had 90%+ market share for 4 years.

Re:“Cookies are small text files” – what? (2009) by throwaway09223 on Saturday August 06, 2022 @01:47PM (#32370109)
The author also doesn't realize that they're still files! Putting the file in a database doesn't change its nature, it's just storing it in a relational database instead of a hierarchical one.

If you store a jpeg file in a database, is it no longer a jpeg file?

Re:“Cookies are small text files” – what? (2009) by mr_mitm on Saturday August 06, 2022 @02:12PM (#32370316)
How are they "still" files? The never have been files. They are some value that is part of the HTTP header. No one would call the HSTS value a text file, even though it's a string of printable bytes in the HTTP header that is stored somewhere on the hard drive by the browser, just like a cookie.
Re:“Cookies are small text files” – what? (2009) by throwaway09223 on Saturday August 06, 2022 @02:36PM (#32370490)
What is your definition of "file" that precludes calling these text files, files?

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.

Re:“Cookies are small text files” – what? (2009) by pbhjpbhj on Saturday August 06, 2022 @02:10PM (#32370292)
Where would you digitally sure a JPEG that's not a database? A file system is a database. I guess arguably it's a record if its in a non file-specific database?
Re:“Cookies are small text files” – what? (2009) by SkipperCat on Saturday August 06, 2022 @12:10PM (#32369285)
True, and in a similar vein, we still have the floppy disk icon for "save to disk". In 20 years, most users will have never seen a floppy disk in their entire life. Still, the icon will remain.
Re:“Cookies are small text files” – what? (2009) by johannes1234321 on Saturday August 06, 2022 @12:34PM (#32369523)
> Still, the icon will remain.

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.

Re:“Cookies are small text files” – what? (2009) by minsight on Saturday August 06, 2022 @12:43PM (#32369590)
> All changes are synced with the cloud and stored immediately

An optimistic outlook, to be sure. Many Dropbox, iCloud, AWS, etc. users who've been burned by their experiences might beg to differ.

Re:“Cookies are small text files” – what? (2009) by cdbyr on Saturday August 06, 2022 @01:37PM (#32370014)
I hope not - for projects with any complexity, knowing I’ve got a checkpoint means I don’t need to think hard about doing risky things. I wonder if Microsoft keeps stats on how many Office users use auto save.
Re:“Cookies are small text files” – what? (2009) by elidendo on Saturday August 06, 2022 @01:25PM (#32369920)
The "call" button on mobile phones is a rotary handset.
Re:“Cookies are small text files” – what? (2009) by BenjiWiebe on Saturday August 06, 2022 @07:14PM (#32372453)
Or normal corded telephone handset.
Re:“Cookies are small text files” – what? (2009) by pbhjpbhj on Saturday August 06, 2022 @02:11PM (#32370301)
It's not a floppy, it's a Zip100!
Re:“Cookies are small text files” – what? (2009) by ninefathom on Saturday August 06, 2022 @03:33PM (#32370882)
This mirrored my reaction as well. My first thought went something like, "that was a reasonably accurate explanation that most computer users would have understood... circa 1999."

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.