iframe loading=lazy Support Lookup
Resolves an iframe loading attribute to eager or lazy and reports whether lazy loading is eligible given caller-supplied browser support and scripting state. Actual viewport scheduling remains browser controlled.
Description
Iframe lazy loading is an optional loading strategy subject to browser support and scripting state.
Iframe lazy loading is an optional loading strategy subject to browser support and scripting state. A declared lazy hint and eligibility for applying it are separate results.1
The tool returns state, eligibleForLazy. The fields describe the supplied local pattern or effective state, or contain the formatted markup shown below.
When to use iframe loading=lazy Support Lookup
Use this for the following task: Resolves an iframe loading attribute to eager or lazy and reports whether lazy loading is eligible given caller-supplied browser support and scripting state. Actual viewport scheduling remains browser controlled. Provide the requested local fields extracted from the relevant element or attribute.
How to use iframe loading=lazy Support Lookup and understand its results
- Prepare the parsed element names, attribute values or direct element-child lists requested below. Keep attribute presence separate from its value.
- Enter present, value, supportsLazy, scriptingEnabled according to the field table, then run the tool.
- Read state, eligibleForLazy. Check the effective state, recognized-token flags or generated markup against the rules below.
- Correct any reported local mismatch and check the resulting markup in its intended document and browser context.
| Input field | Meaning | Value type and bounds | Requirement |
|---|---|---|---|
| present | Present | boolean | Required |
| value | Value | string; maximum text length 100000 | Required |
| supportsLazy | Supports Lazy | boolean | Required |
| scriptingEnabled | Scripting Enabled | boolean | Required |
Supply attribute presence/value and the two environment flags. Resolve lazy only for a present lazy keyword; all other values give eager. Combine that state with the supplied support and scripting flags.
eligibleForLazy = state is lazy AND supportsLazy AND scriptingEnabled The symbols and boundary conditions refer to the supplied fields and the implementation described above.
| Output field | Meaning | Value type |
|---|---|---|
| state | State | string |
| eligibleForLazy | Eligible For Lazy | boolean |
{
"input": {
"present": true,
"value": "lazy",
"supportsLazy": true,
"scriptingEnabled": true
},
"output": {
"state": "lazy",
"eligibleForLazy": true
}
} Limitations and assumptions
The tool does not detect browser features or run scripts. Actual viewport thresholds and loading schedules remain browser controlled.
The tool does not fetch a page, run a browser or validate an entire HTML document. Malformed tool requests produce input errors; valid requests can still report unrecognized values or failed local checks.
Alternative or Complementary methods
Choose img loading eager/lazy Default when you need its operation: Resolves img loading keywords with eager as both missing and invalid default. This reports the hint and does not guarantee actual lazy deferral. Choose iframe sandbox Token List Lookup for the complementary operation: Classifies standard iframe sandbox tokens and resolves the scripts and origin restrictions imposed by this attribute alone. Omitted sandbox differs from an empty sandbox; inherited and CSP restrictions are outside this check.
Background reference: HTML Standard: iframe loading=lazy Support Lookup.
References
Similar or alternative tools
- img loading eager/lazy Default
Resolves img loading keywords with eager as both missing and invalid default. This reports the hint and does not guarantee actual lazy deferral.
- iframe sandbox Token List Lookup
Classifies standard iframe sandbox tokens and resolves the scripts and origin restrictions imposed by this attribute alone. Omitted sandbox differs from an empty sandbox; inherited and CSP restrictions are outside this check.