BabbageFaces

BabbageFaces shrinks the size of the AJAX responses generated by Mojarra 2.2+ and PrimeFaces 5+ applications. You need to activate your browser developer tools and watch the responses to see the effect. The smaller the difference in the view in the browser, the smaller the response.

PrimeFaces demo with IDs

This demo uses the PrimeFaces widgets. PrimeFaces widgets are very sophisticated, which means they require lengthy HTML code. Thus, the effect of BabbageFaces is particularly pronounced. On the other side, you need a lot more code to update a PrimeFaces component than to update a simple Mojarra component.


You can toggle the visibility of the field groups, and you can modify the city name by clicking the button. None of the sections or input fields have an id. Hence the best optimization BabbageFaces can offer is to redraw the entire form.

Expected results:

The original response consists of roughly 21000-25000 bytes.

The button click results in a "attribute" response (rougly 480 bytes).

The check boxes result in "insert" and "update" responses. The values of the checkboxes are updated in the same response, requiring an additional "attribute" tag and an "update" of the PrimeFaces HTML code displaying the check box.

Delete responses take roughly 4000-6500 bytes.

Insert responses are currently disabled. Instead an update of the entire form is required. This takes roughly 9500-15000 bytes.