Search code examples
javajakarta-eejsf-2faceletsicefaces

IceFaces puts it's CSS and JavaScript resources on every page, whether or not they use Ice components. Is there a way to block this?


It appears that merely having IceFaces on your classpath can severely affect your page load times of your JSF application.

Several things are happen, even if no ice: components are used on your page

  • ace-jquery.js 312kb
  • ace-datatable.js.xhtml 182kb
  • theme.css 22kb
  • icepush-js 84kb
  • compat.js 16kb
  • icefaces-compat-js 289kb
  • Total: .88MB

Furthermore a request is polled to the server every 15 seconds to an IcePush listener.

There appears to be no way to turn these off in IceFaces, other than removing the jars from your app. We're trying to migrate to PrimeFaces, but the app is so large, we can only migrate a few pages at a time every release.

The ideal answer is if someone knows a way to turn things off. The next best answer would be a way to implement a wrapper around the resource handler somehow.


Solution

  • Since no one found a better answer, I'll post the only answer I know of, in hopes that someone else may find this information useful.

    What definitively works is removing the following jars from your classpath:

    1. icefaces-compat
    2. icepush
    3. icefaces-ace

    I recommend staying away from IceFaces. Instead, use PrimeFaces with the OmniFaces resource combiner. You can get some compact pages and lightning fast page load times.