The attachment endpoint is located at the root of an application or site’s url space as
The asset endpoint consists of three elements:
App identifier with optional hash i.e.
Asset path i.e.
A complete asset URL pattern: <app-root>//asset/<app-name><:build-id>/<asset-path> i.e.
To make an asset available, simply place it in your projects
src/main/resources/assets/ folder. Once the application is deployed, it will be publicly available through the asset endpoint.
If a file is placed in your projects
src/main/resources/assets/path/to/asset.ext - the same file will always be available on the contextual url:
To optimize the user experience and offload the XP back-end, the asset service supports so-called "perfect caching". By adding a unique hash to the asset url, the asset service will automatically set "infinite cache headers" when serving the asset.
If the asset is changed (currently by deploying a new app), a new asset URL can be generated. This effectively prevents stale cache issues, and optimizes performance at the same time