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

O365 and Offline Cache Manifest Problem

Posted by Paul on March 21, 2015


While working on O365 for an Offline Web Application, I encountered the following problem.

Problem

MIME type of .manifest file is application/x-ms-manifest. We need it to be text/cache-manifest for enabling offline files.

The challenges here are that:

1. O365 is a Microsoft Managed environment & they do not allow adding/modification of MIME type.

Solution

Deploy the .manifest file to another public configurable location. In this way we can change the MIME type and the offline functionality should work.

image

Pre-Changes

Following is how your current application on O365 looks like.

INDEX.HTML

<html manifest=”app.manifest”>

</html>

APP.MANIFEST Contents

CACHE MANIFEST

index.html

logo.png

code.js

http://cdn.ms.com/script.js

Post-Changes

Following is how your application would look like after the changes.

INDEX.HTML Contents

<html manifest=”http://newlocation/webapp/app.manifest”>

</html>

In the http://newlocation/webapp the MIME type will be configured as text/cache-manifest.

Additionally, the app.manifest in the new location should have absolute paths of the files.

APP.MANIFEST Contents

CACHE MANIFEST

http://originallocation/app/index.html

http://originallocation/app/logo.png

http://originallocation/app/code.js

http://cdn.ms.com/script.js

image 

Do not forget to mention all the HTML, JavaScript, Image, CSS files which are part of the offline functionality.

References

http://www.html5rocks.com/en/tutorials/appcache/beginner/

Summary

In this article we have explored a rare scenario with O365 and Offline Application.

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