top | item 44375941

(no title)

allendoerfer | 8 months ago

What about file extensions?

discuss

order

georgyo|8 months ago

File extensions are just a hint about what the file might be and have nothing to do with what the file actually is. If the server sets the MIME type, the browser will use that as the hint.

But even beyond that, most file formats have a bit of a header at the start of the file that declares the actual format of the file. Browsers already can understand that and use the correct render for a file without an extension.

allendoerfer|8 months ago

What if the user wants to use the file outside the browser, where they do not have access to the HTTP headers?

jdiff|8 months ago

Sometimes respected, largely ignored. URLs very often don't map directly to files served.

allendoerfer|8 months ago

Images almost always do.