User agents can cache responses. This http server enables easy support for two such mechanisms:
Conditional requests (using etags) allow the response to be sent only when it has changed
MaxAge response headers allow the user agent to cache entities until some expiry time.
Note that conditional requests (RFC7232) and MaxAge caching (RFC7234) can work together as required. Conditional requests still require network round trips, whereas caching removes all network round-trips until the entities reach their expiry time.
There is support for serving SPA webpage by using WithSPA() this serves index.html for all resources that do not have a file extension
Sub-package gin_adapter provides integration hooks into the Gin web framework. This makes it easy for Gin code to use this asset handler also: see the example in the sub-package for more info.
Earlier versions do not support Go modules, nor brotli encoding, although gzip encoding is supported.
This library has been in reliable production use for some time. Versioning follows the well-known semantic version pattern.