Don’t use mod_deflate (or mod_gzip) for MP3 files

Today I solved a problem that I’ve had for a couple months.  I had a user complain that they the  MP3 Audio embedded on their home page file only played the first few seconds of the audio clip.   I tried it out on my browser and it worked fine.  I also tried it on a couple other machines which worked okay, but finally came across one using Firefox 1.5 that had the same problem.

Unfortunately, I kindof forgot about this until today.  I was looking at some statistics for mod_deflate and noticed that the time coincided with the date that the MP3 stopped working.   I configured Apache to not compress MP3 files, and now it plays fine.

I’m still not sure why it worked on some browsers and not on others, but the important thing is that it works.

Leave a Reply

Your email address will not be published. Required fields are marked *