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 loaded.

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?

  • 1
    I'm escalating this internally. If you're specifying showHeader="false" standardStyleSheets="false" in the <apex:page>, you shouldn't get JiffyStubs.
    – metadaddy
    Sep 20, 2013 at 19:11

2 Answers 2


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!

  • It looks like the problem is worse with Spring '14. JiffyStubs.js has been replaced with /static/111213/js/perf/stub.js, and now /faces/a4j/g/3_3_3.Finalorg.ajax4jsf.javascript.AjaxScript is injected into the page as well.
    – xn.
    May 7, 2014 at 2:46
  • 1
    As I mentioned in another answer, the unconditional inclusion of AjaxScript is a bug, which is fixed in Summer '14. I've raised the priority for fixing the inclusion of stub.js on pages with no header etc, citing this SFSE question as justification.
    – metadaddy
    May 7, 2014 at 4:00
  • Hey Pat, is there any update on this issue since Summer 14? Aug 3, 2015 at 17:26
  • We were not able to resolve this in Spring '14. I'll reach out to PM for an update.
    – metadaddy
    Aug 3, 2015 at 18:49

If you need a solution to prevent loading of JiffyStub.js then here is library which manages which javascript file to load and which not to load. You can try with this, it is small in size and mobile compatible also, Its name is Yepnope.js. Try it.

  • A script tag loading JiffyStubs.js is injected by the VisualForce engine. It's not a file that my page is loading with a script tag or other script loader (we use RequireJS).
    – xn.
    Sep 20, 2013 at 19:13

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .