I’m working with savegame files for a video game with the extensions .svg.
Browsers interpret it as scaled vector graphics, so I added AddType application/octet-stream .svg to the .htaccess file. This works for Firefox and Chrome, but believe it or not, I’m having trouble with good ‘ol Internet Explorer.
Any ideas?
Compared to other browsers, Internet Explorer does some rather advanced attempts at detecting the contents of application/octet-stream. It will basically first check if it recognizes the content, and if it doesn’t, it will base the handling on the file suffix (in this case svg). Other browsers will be perfectly happy with the content type you tell them.
Making it work on IE depends what you’re trying to do with the file. If you’re just trying to download it as a file, you could use a
Content-Disposition: attachment; filename="myfile.svg"header to force IE to download and not attempt to view the file. An example how to do this is available here.