I vaguely recall reading that for some audio and video file types, some browsers check not only the HTTP Content-Type
header but also the file extension in the URL. Is that so? And what would happen if I output, for example, an MP4 video with the correct Content-Type: video/mp4
HTTP header but an unusual file extension (or no file extension at all)?
Asked
Active
Viewed 406 times
1

TRiG
- 1,181
- 3
- 13
- 30
1 Answers
1
Yes and no.
Quicktime is shocking at reading MIME types and relying on extensions. The older versions seemed to be OK. You can read my troubles about it here.
I've also seen FireFox do strange things when your MIME type and extension are different. For example, downloading a jpg
with Content-Disposition=attachment
without setting a MIME type it went and put a .html
extension on the end of the file after it had finished downloading.

Mark Henderson
- 68,823
- 31
- 180
- 259