So in Orbeon Forms 3.9, we revisited the whole aggregation feature to make it even better!
- built-in XForms engine resources
- XBL resources
- custom resources placed by the form author
- baseline resources: resources that every single page will load no matter what
- supplemental resources: resources specific to the current page
- non-aggregated resources
For baseline and supplemental resources, a hash is computed based on the paths to the resources and a version number (Orbeon Forms version number plus, if present, your application's version number). This hash is included in the URL sent to the browser. This ensures that aggressive, perpetual caching can take place on the browser. So you will see paths like:
Then the server maps the hashes to the list of actual resources, which when requested by the browser can then be aggregated on the fly and even subsequently cached on the server.
Baseline and supplemental resources are aggregated separately. The idea of the baseline is the assumption that in an application, many pages will share lots of resources. Once you have hit a page the first time and caching has occurred, the baseline resources will be picked directly from cache on all subsequent pages.
Only the supplemental resources, which we hope are small (or even empty if the baseline includes everything you need for all pages), will be loaded for each new page. Of course, the supplemental resources too are cached aggressively by the browser.
Finally, there are some resources that can't be aggregated easily: for example, CSS targeting a specific media. There are usually no such resources, or few of them.
The result: fewer requests to the server when loading and navigating Orbeon Forms pages, and also a cleaner implementation.