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

  1. Prepare the parsed element names, attribute values or direct element-child lists requested below. Keep attribute presence separate from its value.
  2. Enter present, value, supportsLazy, scriptingEnabled according to the field table, then run the tool.
  3. Read state, eligibleForLazy. Check the effective state, recognized-token flags or generated markup against the rules below.
  4. Correct any reported local mismatch and check the resulting markup in its intended document and browser context.
Input fieldMeaningValue type and boundsRequirement
presentPresentbooleanRequired
valueValuestring; maximum text length 100000Required
supportsLazySupports LazybooleanRequired
scriptingEnabledScripting EnabledbooleanRequired

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 fieldMeaningValue type
stateStatestring
eligibleForLazyEligible For Lazyboolean
json
{
  "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

  1. HTML Standard: iframe loading=lazy Support Lookup — WHATWG

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.

Don't forget to set a bookmark for tool.io!
Privacy | Imprint | Cookies