PrerenderHintParser
Extract prerender link hints from HTML source without fetching, validating browser support, or resolving their hrefs.
Description
A prerender hint declares a page a browser might prepare before navigation.
A prerender hint declares a page a browser might prepare before navigation. Its presence in source does not establish that any browser actually prerendered it.1
Extract prerender link hints from HTML source without fetching, validating browser support, or resolving their hrefs.
When to use PrerenderHintParser
Use this tool to extract prerender link hints from HTML source without fetching, validating browser support, or resolving their hrefs.
Choose the URL, decoded source text, header value or explicit byte list requested by this tool. Paste the complete relevant input and follow its parsing and encoding conventions.
How to use PrerenderHintParser and understand its results
- Choose the URL, decoded source text, header value or explicit byte list requested by this tool. Paste the complete relevant input and follow its parsing and encoding conventions.
- Enter html using the field table and calculation rules, then run the tool.
- Read hrefs. The explanation below defines the units, signs, ordering and any flags or placeholder values.
- If the tool reports an input issue, correct the values and run it again. Apply the stated assumptions when interpreting a successfully returned result.
| Input field | Meaning | Value type; see rules below | Requirement |
|---|---|---|---|
| html | HTML source. | string; maximum length: 1000000 | Required |
Paste HTML. Scan start tags, split rel on ASCII whitespace case-insensitively, and collect href from matching link elements. Decode supported character references and preserve order and duplicates. Missing href is skipped; no matches gives an empty list.
hrefs=source-order link hrefs with a rel token equal to prerender Units, indexing, boundary conditions and exceptional cases are defined in the calculation rules above.
| Output field | Meaning | Value type |
|---|---|---|
| hrefs | Matching link hrefs in document order. | list of string; maximum length: 1000000; minimum entries: 0; maximum entries: 100000 |
{
"input": {
"html": "<link rel=\"PRERENDER\" href=\"/app.js\"><link rel=\"stylesheet\" href=\"/style.css\">"
},
"output": {
"hrefs": [
"/app.js"
]
}
} Limitations and assumptions
The source scanner does not resolve relative URLs, render scripts, fetch pages or evaluate browser support. Only numeric and a limited set of named references are decoded.
Numeric inputs must be finite. Follow the calculation-specific rules for overflow, underflow and exceptional cases. Extremely large text inputs are rejected. Missing required fields, extra fields, wrong value types and violations of the calculation rules are input errors.
Alternative or Complementary methods
Use PreconnectHintParser: Extract preconnect link hints from HTML source without fetching, validating browser support, or resolving their hrefs. For a complementary task, use LinkPreloadDetector: Extract preload link hints from HTML source without fetching, validating browser support, or resolving their hrefs.
References
-
PrerenderHintParser — tool.io
Similar or alternative tools
- PreconnectHintParser
Extract preconnect link hints from HTML source without fetching, validating browser support, or resolving their hrefs.
- LinkPreloadDetector
Extract preload link hints from HTML source without fetching, validating browser support, or resolving their hrefs.