Target browsers: cross-browser
As explained in Chapter 6, Mobile Rich Media, cache manifest is used for offline web applications. The extensions for this file may not be recognized by the server. Let's see how we can add the proper MIME type.
Add the following code:
AddType text/cache-manifest appcache manifest
Upload the .htaccess
file to the folder you want the rules to apply.
Cache manifest may have either .appcache
or .manifest
as its extension. By adding both types as text/cache-manifest
, we are making sure they can both be rendered correctly regardless of which one is used.
The .htaccess
rule is included in the Mobile Boilerplate:
https://github.com/h5bp/mobile-boilerplate/blob/master/.htaccess#L75