views:

21

answers:

2

Hi, after I define a kind of file format, it is dificult for hosting providers to register it for my site? i can ask that after i paid the service? it must be a mime type properly register at ietf.

thanks in advance

A: 

MIME types are relatively flexible when it comes to creating new ones, in the sense that you can specify that a file is of type application/x-my-file-type and that's perfectly valid. As such, you should be able to specify, either through configuration files or scripts, that such MIME-type data will be sent with the file, but only on your host. Getting other sites to recognize your format will depend on each individual webmaster's (or hosting company's) decision.

Of course, that may not even matter to you. So, in short, YES you can define your own MIME-type (as long as you follow the rules), and YES you can configure your server to throw that MIME-type around. However, getting the rest of the world in compliance is the sticky-tricky part.

EDIT: To answer again in a different way: No, it is not difficult, you should be able to either do it yourself or have basic support walk you through it, depending on your implementation. It shouldn't cost you any money unless your host sucks, although this is my opinion and not necessarily a fact.

EDIT 2: To address your comment to this question (since the comment box doesn't have enough room):

If you are using Apache, you can create (or modify) an .htaccess file, which is very easy. For this example, say your file type is application/x-foo-file and the files are named with a .foo extension, you would need to add this line:

AddType application/x-foo-file foo.

If you aren't using Apache, you will need to look up your specific steps in whatever server you are using, although it is possible to use a scripting language (PHP, ASP, etc) to serve your files with the correct MIME headers.

PHP: header('Content-Type: application/x-foo-file');

ASP: Response.ContentType="application/x-foo-file"

Dereleased
thanks for answer, it depends of the hosting company at the end, this can be hard to accomplish?
Horacio N. Hdez.
I have updated my original answer (see: edit2) to reflect an answer to this question. Hope this helps.
Dereleased
A: 

The "x-" experimental registration tree is for unregistered or experimental types. If you are registering your mimetype you should use the vendor or personal registration tree, for instance "application/vnd.com.mycompany.foo" or "application/prs.com.myname.foo". See Appendix D of the O'Reilly book "HTTP: The Definitive Guide" (with the squirrel on the cover), http://oreilly.com/catalog/9781565925090/.

Mark Lutton