early_hints
Version: v2025-01-13 | Includes use: Yes |
---|
Behavior name: Early Hints
Use Early Hints to send an HTTP 103 status code with preliminary HTTP headers at the client request stage, so that a browser can preload critical website resources or preconnect to a specific domain while waiting for the final response.
The 103
response occurs only when the Sec-Fetch-Mode
request header’s value is navigate
. Since this is a default setting that’s already a part of the behavior’s logic, you don’t need to set any additional match criteria. However, if you add this behavior to a rule where a requestHeader criteria matches a Sec-Fetch-Mode
value other than navigate
, you get a validation error.
See the Property Manager guide for more caveats, examples, and implementations using EdgeWorkers.
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" "early_hints" {
rules_v2025_02_18 {
name = "Early Hints"
comments = "Sends an HTTP 103 status code with preliminary HTTP headers at the client request stage."
behavior {
early_hints {
enabled = false
}
}
}
}
"behaviors": [
{
"name": "earlyHints",
"options": {
"enabled": false
}
}
]
Options
Option | Description |
---|---|
enabled |
Enable the behavior so that browsers can use that waiting time to preload the resource URLs you specify or preconnect to static or image domains.
|
resource_url |
Enter the URL to a resource you want clients to receive as an early hint. Edge servers include each resource URL you provide in an instance of the
Link header that's sent back to the client in the HTTP 103 response. You only need to specify the value of the header, as edge servers automatically add the Link header name to the response. Use commas to separate multiple entries. This field supports variables and string concatenation. The URL must be enclosed between < and > . For example, <https://cdn.example.com/assets/main1.css>;rel=preload;as=style
|
Updated about 1 hour ago