@resource

Used to create a browser-ready and cache-sensitive URI to a resource within the application.

Parameters

  • uri

Examples

<img src="{@resource uri="/images/logo.svg"/}">

When rendered in the browser, this may look like:

<img src="/images/logo-817284192131.svg">

Where 817284192131 is a hash of the file. The hash changes when the file contents change. The has is automatically filtered out of the URI upon request so that the original file is returned. It guarantees that the browser is allowed to fully cache the resource. When the resource changes, the hash changes.