2

When a local file is opened in Safari or -- more important to my situation -- a custom application that uses a WebView for display, what decides on the MIME type to associate with the resulting file URL?

I see that there are MIME registration files associated with Apache and CUPS but experiments seem to show that neither of those is used for direct file access.

  • This sounds like a development question. Would it get a better response on stack overflow? – g . Sep 11 '12 at 20:17
  • It's really a system configuration question, except for the part where I don't know which piece of the system to configure. :) As a developer, when I open a file URL, I'm told what OSX thinks its MIME type is. In that role, there's nothing I can do to influence the incoming information. (But, thanks, I may try S.O. just because there could be others there who have been in the same position.) – Phillip Mills Sep 11 '12 at 20:27
  • I read somewhere yesterday (sorry, too many pages opened to retrace the source) and IIRC, that while Windows associates MIME types at the OS level, Mac/Linux (as in the browser) detect within the file itself. The info within the question I just posted now at https://apple.stackexchange.com/questions/328325/preferred-way-to-set-default-application-by-content-mime-type may be of interest though not sure when or if the browser uses that info (e.g., in preference to file detection or if file detection fails). – Brett Zamir Jun 21 '18 at 02:05

0 Answers0