link preload as= Types List

Checks the six current HTML preload as destinations and translates fetch to the empty Fetch destination. Modulepreload has a separate vocabulary and is outside this lookup.

Description

Preload declares an expected resource destination so a browser can prepare its fetch.

Preload declares an expected resource destination so a browser can prepare its fetch. The HTML as value fetch corresponds to an empty internal Fetch destination.1

The tool returns valid, fetchDestinations. The fields describe the supplied local pattern or effective state, or contain the formatted markup shown below.

When to use link preload as= Types List

Use this for the following task: Checks the six current HTML preload as destinations and translates fetch to the empty Fetch destination. Modulepreload has a separate vocabulary and is outside this lookup. Provide the requested local fields extracted from the relevant element or attribute.

How to use link preload as= Types List 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 values according to the field table, then run the tool.
  3. Read valid, fetchDestinations. 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
valuesValueslist of string; minimum entries 0; maximum entries 10000; each entry: maximum text length 10000Required

Supply a list of attribute values. Fold ASCII case, return per-value membership flags and translate fetch to an empty destination string.

allowed as values: fetch, font, image, script, style, track

The symbols and boundary conditions refer to the supplied fields and the implementation described above.

Output fieldMeaningValue type
validValidlist of boolean
fetchDestinationsFetch Destinationslist of string
json
{
  "input": {
    "values": [
      "font",
      "FETCH",
      "video",
      "script"
    ]
  },
  "output": {
    "valid": [
      true,
      true,
      false,
      true
    ],
    "fetchDestinations": [
      "font",
      "",
      "",
      "script"
    ]
  }
}

Limitations and assumptions

Invalid values also have an empty destination, so read valid alongside it. No resource is fetched; modulepreload has a separate vocabulary.

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 dns-prefetch rel Usage Lookup when you need its operation: Identifies dns-prefetch in a parsed link relation and a supplied nonempty href. This classifies the hint only and performs no DNS or URL validation. Choose Web App Manifest link rel Lookup for the complementary operation: Checks a parsed link for the manifest relation and a nonempty href. This local check does not fetch or validate the manifest document.

Background reference: HTML Standard: link preload as= Types List.

References

  1. HTML Standard: link preload as= Types List — WHATWG

Similar or alternative tools

  • dns-prefetch rel Usage Lookup

    Identifies dns-prefetch in a parsed link relation and a supplied nonempty href. This classifies the hint only and performs no DNS or URL validation.

  • Web App Manifest link rel Lookup

    Checks a parsed link for the manifest relation and a nonempty href. This local check does not fetch or validate the manifest document.

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