Proper MIME types Print

  • 0

Mime types tell browsers how to handle specific extensions.

For example, the text/html mime type equates to .htm, .html, and .shtml extensions on most servers, and this tells your browser to interpret all files with those extensions as HTML files. You can alter or add new mime types specifically for your site (note that you can not alter the system defined mime type values).

Here is an example of the cPanel interface.

The above example shows me telling Apache to treat my .html and .htm files as PHP files. This is helpful if your .html files have PHP code inside, but you cannot rename the files to the .php extension; however, this is notably more resource intensive, so use with caution.

MIME types are often used to handle new technologies as they appear. When WAP technology first appeared, no one had these extensions set up on their server. However, with mime types you could have set it up yourself and begun serving WAP pages immediately.


Was this answer helpful?

« Back

Need help? Call our award-winning support team at 080 3791 8162