Today I Learned - Rocky Kev

TIL why jpeg vs jpg

POSTED ON:

TAGS:

Sometimes you see files with .jpeg but then other times, you see it as .jpg.

Why is that?

Older OSes, like DOS couldn't handle 4-letter extensions.

It's not a problem today. But for backward-compatibly, the 3-letter system stuck.

via Dunbaratu on reddit:

In UNIX and Mac systems, a filename extension meant nothing and in fact wasn't even really a thing. You could place a period in a filename if you felt like it but the system didn't see it as meaning anything special. As far as the OS was concerned, a filename like abc.def is just a 7 character filename where the third character happens to be a period for some reason. The def wasn't even stored in a separate field.

In DOS systems, a filename extension was a different part of the name stored in a different field that can only be 3 characters. You still see this legacy today in Microsoft's .NET software, where most system calls that use the word "filename" in their name don't really mean the whole filename. They mean just the part without the extension.

Via zero_z77 on Reddit

When microsoft office 2007 came out, they changed the format for office files from a proprietary binary format, to an xml based format. To distinguish these files from legacy office files, an 'x' was added to the file extension. So .doc became .docx, .xls became .xlsx, .ppt became .pptx, and so on. They also did this when asp.net (.aspx) was introduced to distinguish it from classic asp (.asp).

Via Santacroce

There are plenty of answers as to why now, but it's actually not that rare of a thing. There is also:

and also .mp4 and .mpeg4


Related TILs

Tagged:

TIL Netflix's System Design

Netflix operates in two clouds: Everything that happens after you hit play is handled by Open Connect. Open Connect stores Netflix video in different locations throughout the world. Anything that doesn’t involve serving video is handled in AWS.

TIL minimal responsive image component

So when I saw that JS frameworks made image wrapper components (like Nuxt was with nuxt-img), I was blown away and wanted this power at work.

TIL executing a xss using a SVG image

This user was able to upload a '.svg', that then executed a xss attack to steal local storage data.