Available since version 1.2.0
This feature is not AEM as a Cloud Service compatible; starting with the release 4.6.2 this feature is disabled on this platform (including the SDK).
How to Use
Add a Sling rewriter configuration node (example below) that includes the
versioned-clientlibs transformer type to you project.
The URIs to clientlibs will be rewritten in the format
Prior to version 1.5, the last modified timestamp was used instead of a hash.
This re-writer does NOT support
- Relative URIs, e.g.
- URIs including a scheme, e.g.
- URIs to non-AEM HtmlClientLibrary resources, e.g.
- Tags contained in conditional comments.
Rewriter Configuration Node
The easiest way to configure the rewriter pipline is just to copy
/libs/cq/config/rewriter/default to a path inside your application, e.g.
/apps/myapp/config/rewriter/versioned-clientlibs. Note that the configuration node must be inside a four-level path that ends in
To validate that your configuration was successful, look at the Sling Rewriter tab in the OSGi Web Console.
Other transformers may or may not be necessary. Please refer to the default configuration at
/libs/cq/config/rewriter/defaultto see the default set of transformers.
To configure Apache to send the right header to set a long TTL:
MD5 Enforcement (Since 2.11.0/3.8.0)
Optionally, a filter can registered which checks incoming requests for client libraries and ensures that the hash in the path is the correct value. To enable this, set the property
true on the PID
If you enable this option, the hash will be prefixed with
ACSHASHto ensure that only rewritten paths are validated. Be sure to incorporate this into any web server or CDN rules.
Log Warnings under AEM 6.3+
When using this feature on AEM 6.3, you may see log messages like this for proxied client libraries:
15.12.2017 17:34:40.249 WARN [10.45.0.1  GET /aem/start.html HTTP/1.1] com.adobe.granite.ui.clientlibs.impl.HtmlLibraryManagerImpl No library configured at /apps/granite/ui/components/coral/foundation/clientlibs/foundation
The only solution at present for this is to set the log level for