posted 3 years ago
It's important to remember that web browsers don't receive "files", they receive data streams. The data stream's "type" should be marked via a Content-Type header.
Content-type refers to a MIME value. MIME, incidentally, stands for Multimedia Internet Mail Extensions, since it was first designed for email with non-text content, then adapted for web use.
When a web client (browser) receives a data stream, it looks up the Content-Type MIME type. There's typically a file or database somewhere it references, either client-specific or sometimes system-wide.
The MIME type lookup typically will return what filename extension(s) that type is associated with. For example, in the global MIME mapping (/etc/mime.types) file on my machine, the type application/gzip assiciates with "gz" and "gzip" file extensions.
In-browser MIME mapping may also specify the default disposition for a data stream - that is, "display in browser" or "save as file".
So the file save options dialog's selection of default file types for a given Content-Type depends on the browser and the browser's preferences possibly augmented by sysytem preferences.
Often the most important part of the news is what they didn't tell.