How to deal with JiffyStubs.js, the html5 application cache, and network latency?

We have a mobile app that runs within the Phonegap container, and is initialized
from a VisualForce page. We use the html5 application cache so the application can be started offline.

We are working on improving the initialization time by starting the app from
the app cache even when online. This significantly improves start-up time on
low-bandwidth/high-latency connections.

The injection of JiffyStubs.js into the VisualForce page is the last hurdle to
initializing the application while online without any dependencies on actual
network connectivity. Our app cannot start until JiffyStubs.js is

We could add the path to JiffyStubs.js to our cache manifest, but the URL is
subject to change. If it changes, app initialization is again subject to the
file being loaded or the attempt to do so timing out. Furthermore, if the URL
changes and the old URL is no longer valid, the application cache will fail to
cache the app, breaking offline initialization.

We need a way of either preventing JiffyStubs.js from being injected into the
page, or of getting the URL to the current version so we can include a
non-hard-coded reference to it in our cache manifest.

Any ideas?


The bad news, right now, there is no way to prevent JiffyStubs.js from being injected into the HTML, and there is no way to predict the timestamp.

The good news: this is a known issue, that was languishing with a low priority, since the impact on customers was not clear. It’s now been promoted with a scheduled build of Spring ’14 (Winter is pretty much baked). Safe Harbor!

Source : Link , Question Author : xn. , Answer Author : metadaddy

Leave a Comment