What type of mime should i use for mp3

I am trying to decide which type of mime to choose to return mp3 data (submitted php)

according to this listing of mime types: http://www.webmaster-toolkit.com/mime-types.shtml

.mp3 audio/mpeg3 .mp3 audio/x-mpeg-3 .mp3 video/mpeg .mp3 video/x-mpeg 

What is the difference between them and which should I use?

+79
mime-types php mp3
May 21 '12 at 16:00
source share
5 answers

It is best to use the RFC defined by mime-type audio/mpeg .

+114
May 21 '12 at 16:03
source share

I had a problem with mime types and where tests were run for several file types. It looks like every browser sends a mime type change for a specific file. I tried to download open source php mp3 and zip files that I found:

  • Firefox (mp3): audio / mpeg
  • Firefox (zip): application / zip
  • Chrome (mp3): audio / mp 3
  • Chrome (zip): application / octet-stream
  • Opera (mp3): audio / mp 3
  • Opera (zip): application / octet-stream
  • IE (mp3): audio / mpeg
  • IE (zip): application / x-zip-compression

So, if you need several types of files to download, you should do some tests so that each browser can download the file and pass the mime type check.

+23
Jan 19 '15 at 9:38
source share

Use .mp3 audio/mpeg , which I always used. I think others are just aliases.

+10
May 21 '12 at 16:02
source share

You should always use audio / mpeg since firefox cannot play audio / mpeg3 files

+4
Jul 02 '14 at 8:28
source share

standard way to use audio/mpeg , something like this in your PHP header ...

header('Content-Type: audio/mpeg');

+1
Jun 27 '15 at 4:34
source share



All Articles