Enonic Market Enonic Market
Static assets library icon

Static assets library

The optimal way of serving static assets (and webapps) with Enonic


  • Chunked and hashed files can be served with lib static

Serves assets from any folder in the applications file structure. This library aim is "perfect client-side and network caching" via response headers. Basic error handling included, and a simple but highly configurable usage. Library also serves index.html files for folder level requests.


  1. 1.0.2

    • Bugfix: relying on XP version 7.7.1 or above, this update improves consistency of index fallbacks and redirects with and without a trailing slash
    • Compatibility:
      • 7.7.1
  2. 1.0.1

    • Bugfix: directories can be referenced without a trailing slash and still have the index fallback functionality. This involves a workaround for a bug in underlying OSGi, and temporarily sacrifices serving of empty files (which will now respond with a 404). Empty file serving will be re-introduced when possible.
    • Compatibility:
      • 7.6.0
  3. 1.0.0

    • Initial release
    • Compatibility:
      • 7.6.0
  4. 0.1.0

    • Beta
    • Compatibility:
      • 7.6.0

Download Static assets library

This version requires XP

An XP library is normally included in your application through the Gradle build script like this:

                    dependencies {
    include 'com.enonic.lib:lib-static:1.0.2'

Download the source code for Static assets library

Documentation for Static assets library