Welcome!

Welcome to the official BlackBerry Support Community Forums.

This is your resource to discuss support topics with your peers, and learn from each other.

inside custom component

Web and WebWorks Development

Reply
New Contributor
Posts: 5
Registered: ‎03-29-2011
My Device: BlackBerry Torch 9800
My Carrier: AT&T

Withing WebWorks, window.applicationCache.status == 0, causing window.applicationCache.update() to throw Exception

Hello All,

 

I have an html page page that loads a manifest file for HTML5 offline caching.  When I check the window.applicationCache.status value in Firefox, Chrome, or the BlackBerry 6 Browser, I get a value of 1, meaning the manifest file has been found and when I call window.applicationCache.update(), the resources from the manifest file are downloaded.

 

However, when I place that same HTML page (which has absolute references to manifest file and static js, etc. files) as the content src file with WebWorks (via the config.xml), the window.applicationCache.status has a value of 0 (UNCACHED) and window.applicationCache.update() throws an exception.

 

Any ideas anyone?  Another note... If another index.html file is placed as the content src within the config.xml and on load it redirects to the HTML page on the server, the window.applicationCache.status == 1 and all works fine.  I'm not sure if there is a "feature" permission that needs to be set, or if I'm missing something.

 

Thanks,

Mike Bushman

New Contributor
Posts: 5
Registered: ‎03-29-2011
My Device: BlackBerry Torch 9800
My Carrier: AT&T

Re: Withing WebWorks, window.applicationCache.status == 0, causing window.applicationCache.update() to throw Exception

By the way... I figured this out.

 

If the content element of the config.xml is pointing to a HTML file embedded in the app, ApplicationCache will not work.  However, if you direct the content to an external page, ApplicationCache works fine.  I don't know the reason, but I wonder if webkit just doesn't a domain to store the AppCache to.

Contributor
Posts: 14
Registered: ‎02-25-2011
My Device: Z10
My Carrier: telcel

Re: Withing WebWorks, window.applicationCache.status == 0, causing window.applicationCache.update() to throw Exception

hello, im having the same problem, but your solution doesnt work for me, im searching for manifest in webworks and only you are aware of this.

 

have you change something on ur code?