5
votes

I am trying to make an xPages desktop application work offline, the challenge is how to make all the require resource available offline.

i have created the following manifest file and specified the same in pageManifest .

CACHE MANIFEST
#version: 0.0.15.7
jquery-1.10.2.min.js
angular.min.js
/DbPath/Angular.nsf/trashicon.gif
/DbPath/Angular.nsf/editicon.gif
/xsp/.ibmxspres/.mini/css/@Da&@Ib&2Tfxsp.css&2TfxspLTR.css&2TfxspSF.css.css
/xsp/.ibmxspres/dojoroot-1.6.1/dojo/dojo.js
/xsp/.ibmxspres/.mini/dojo/.en-us/@Iq.js
/DbPath/Angular.nsf/xsp/.ibmmodres/.css/bootstrap.min.css&custom.css
/DbPath/Angular.nsf/xsp/.ibmmodres/.js/jquery-1.10.2.min.js&bootstrap.min.js&angular.min.js&angularMisc.js

NETWORK:
/xsp/.ibmxspres/
/domjs/dojo-1.4.1/
/domjava/xsp/

I am not sure it is correct, it cache following image / Lib

/DBPath/Angular.nsf/trashicon.gif

/DBPath/Angular.nsf/editicon.gif 

/xsp/.ibmxspres/dojoroot-1.6.1/dojo/dojo.js

/xsp/.ibmxspres/.mini/dojo/.en-us/@Iq.js

and the main page...

but it does not cache the

/DBPath/Angular.nsf/xsp/.ibmmodres/.js/jquery-1.10.2.min.js&bootstrap.min.js&angular.min.js&angularMisc.js

which is important, may b i am doing it wrong. Also how can we cache the oneui theme . i am using Angular JS/JQuery which works fine when not cached, but it do not work with the manifest

if their is any simple example please share the link.

4
Just replicate the application locally? Or are you not using the Notes client?Simon O'Doherty
i want to try it without Lotus Notes clientanix

4 Answers

2
votes

What part of the app do you want to make available offline? If you're using full or partial updates, Server Side JavaScript and other server based stuff it cannot work offline.

1
votes

Although this refers to Mobile apps it does have a sample showing you how to use HTML5 offline mode in XPages.

http://mobilecontrols.openntf.org

Offline.nsf contains basic HTML5 samples for how to do offline with XPages. MobileControlsOffline.nsf shows how to take a Dojo based mobile app offline.

0
votes

The definition of a manifest makes an interesting read, as well as the URL document with the section about valid URLS.

As far as I know & is not a valid URL character if is isn't part of a parameter string that starts with ?.

So there are a set of actions you can try:

  • Switch off js/css combination. Since the files get cached locally anyway you don't benefit from it
  • Try (it might work) to replace & in the manifest with &

Let us know how it goes.

0
votes

I did some tests (using Domino Designer) with Firefox and Chrome and it seems that everything can be cached in these browsers. My sugestion:

Instead of

/DBPath/Angular.nsf/xsp/.ibmmodres/.js/jquery-1.10.2.min.js&bootstrap.min.js&angular.min.js&angularMisc.js

Try a relative path without /

xsp/.ibmmodres/.js/jquery-1.10.2.min.js&bootstrap.min.js&angular.min.js&angularMisc.js

I used relative paths everytime. This is the cache manifest file used in my tests (all files were cached successfully):

CACHE MANIFEST
# 2013-01-07 v1.0.0
xsp/.ibmmodres/.js/js%2Fvendor%2Fmodernizr-2.6.2-respond-1.1.0.min.js&js%2Fvendor%2Fjquery-1.10.2.min.js&js%2Fvendor%2Fbootstrap.min.js&js%2Fvendor%2Fhandlebars.runtime-v1.1.2.js&js%2Fplugins.js&js%2Fmain.js
xsp/.ibmmodres/.css/css%2Fbootstrap.min.css&css%2Fbootstrap-theme.min.css&css%2Fmain.css
xsp/.ibmmodres/.js/jquery-1.10.2.min.map
/xsp/.ibmxspres/.mini/css/@Da&@Ib&2Tfxsp.css&2TfxspLTR.css&2TfxspSF.css.css
/xsp/.ibmxspres/dojoroot-1.6.1/dojo/dojo.js
/xsp/.ibmxspres/.mini/dojo/.es-es/@Iq.js
/xsp/.ibmxspres/.mini/dojo/.es/@Iq.js
NETWORK:
*