instant
Version: v2025-01-13 | Includes use: Yes |
---|
Behavior name: Akamai Instant (Prefetching)
The Instant feature allows you to prefetch content to the edge cache by adding link relation attributes to markup. For example:
xml <a href="page2.html" rel="Akamai-prefetch">Page 2</a>
Default link relation values are prefetch and Akamai-prefetch. Applies only to HTML elements that may specify an external file: <a>
, <base>
, <img>
, <script>
, <input>
, <link>
, <table>
, <td>
, or <th>
. For the latter three, some legacy browsers support a nonstandard background image attribute.
This behavior provides an alternative to the prefetch
and prefetchable
behaviors, which allow you to configure more general prefetching behavior outside of markup.
Default behavior
These samples reflect the behavior's default settings. You can use these as is in your configurations or make adjustments based on the behavior's available options.
data "akamai_property_rules_builder" "instant" {
rules_v2025_02_18 {
name = "Akamai Instant (Prefetching)"
comments = "Prefetches content to the edge cache by adding link relation attributes to markup."
behavior {
instant {
prefetch_cacheable = false
prefetch_no_store = false
}
}
}
}
"behaviors": [
{
"name": "instant",
"options": {
"prefetchCacheable": false,
"prefetchNoStore": false
}
}
]
Options
Option | Description |
---|---|
prefetch_cacheable |
When enabled, applies prefetching only to objects already set to be cacheable, for example using the
caching behavior. Only applies to content with the tiered_distribution behavior enabled.
|
prefetch_no_store |
Allows otherwise non-cacheable
no-store content to prefetch if the URL path ends with / to indicate a request for a default file, or if the extension matches the value of the prefetch_no_storeExtensions option. Only applies to content with the sure_route behavior enabled.
|
prefetch_no_storeExtensions |
Specifies a set of file extensions for which the
prefetch_no_store option is allowed.
|
prefetch_html |
Allows edge servers to prefetch additional HTML pages while pages that link to them are being delivered. This only applies to links from
<a> or <link> tags with the appropriate link relation attribute.
|
custom_link_relations |
Specify link relation values that activate the prefetching behavior. For example, specifying
fetch allows you to use shorter rel="fetch" markup.
|
Updated about 1 hour ago