Adding MIME Types

From AgileApps Support Wiki
Revision as of 20:11, 2 October 2013 by imported>Aeric (Created page with "When a Document or Static Resource is stored on the server, the appropriate {{^MIME}} type must be specified when the file is sent to the user's browser, so the browser k...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

When a Document or Static Resource is stored on the server, the appropriate MIME type must be specified when the file is sent to the user's browser, so the browser knows what to do with that file.

Normally, the process takes place automatically. The most common file extensions are already recognized by the platform, and are delivered to client browsers with the necessary MIME type.

In some cases, however, a file has an extension that the platform does not recognize, which causes the file to be mishandled when it reaches the browser.

That problem can be fixed by adding a line to the Apache/conf/httpd.conf configuration file:

AddType  MIME_TYPE  FILE_EXTENSION

For example, to configure an HTML5 cache file with extension .appcache, add the following:

AddType  text/cache-manifest  .appcache