Jean Paul's Blog

There are 2 types of People in the World, One who Likes SharePoint and..

    Advertisements
  • Microsoft MVP

  • MindCracker MVP

  • CodeProject MVP

  • eBook on SharePoint 2010

  • eBook on Design Patterns

  • eBook on Windows Azure

  • NLayers Framework @ CodePlex

  • MSDN Forums

  • .Net vs. Java

    Due to Public Demand
  • Advertisements

Right MIME Type for Application Cache

Posted by Paul on March 25, 2015


For HTML5 Application Cache to work we need to specify the cache file. This cache file will specify the application files which need to be cached.

MIME Type

The MIME (Multipurpose Internet Mail Extension) Type will vary for each extension.

For example: .ttf extension is pre-registered with MIME type application/x-font-ttf which makes the browser treat the file of such extension as font.

Extension

The cache file should be of the correct extension. For the Application Cache to work the MIME type should return text/cache-manifest.

Following is the correct extension:

  • .cachemanifest

The following extension is wrong as the MIME type associated as it returns application/x-ms-manifest

· .manifest

IIS MIME Types

Open IIS Manager to view the MIME types registered as shown below.

image

image

The above cache extension was tested in IE 11 and was working fine.  Please test with other browsers to ensure proper functioning of cache extension.  If you have a separate requirement of adding/editing MIME types in O365, the preferred approaches would be:

  1. Try Get-SPWebApplication Cmdlet
  2. Contact Microsoft Support

Summary

In this post we have explored the correct MIME type for Application Cache.  You can also refer to the W3C information here.

http://www.jeanpaulva.com/index.php/2015/05/03/cache-file-extension-appcache-or-cachemanifest/

 

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s