Referrer Attribute Parser
Parse ONEHTML referrer policy attribute enumonly, unknown/empty means no explicit recognized policy. Not comma-separated HTTP header last token selection, default document policy, actual ReferrerURLor network decision.
Description
A referrerpolicy attribute names a policy for controlling referrer information.
A referrerpolicy attribute names a policy for controlling referrer information.1
Recognizing its value is a separate step from resolving document policy and deciding what a request will send. The calculation and input requirements are explained below.
When to use Referrer Attribute Parser
Enter one attribute value.
How to use Referrer Attribute Parser and how it works
- Prepare the measurements or independently established model inputs described below, with matching units and observation scope.
- Enter the required fields and run Referrer Attribute Parser.
- Read the result fields using the formula, output units, signs and ordering explained below.
- Correct any rejected inputs and rerun; interpret the result within the stated model and its assumptions.
| Input field | Meaning | Value type | Requirement |
|---|---|---|---|
| actualReferrerPolicyAttributeValue | Actual Referrer Policy Attribute Value. Use the units and matching context stated in the calculation below. | string | Required; other constraints below |
Enter one attribute value. Trim surrounding whitespace and lowercase it, then compare with the eight policy tokens in the table. A recognized token returns true and its normalized spelling; an empty or unrecognized value returns false and empty text. Comma-separated HTTP header lists and effective document-policy resolution are outside this parser.
recognized=normalizedValue in supportedTokens Apply the input ordering, units and branch conditions stated above.
| Recognized attribute policy | Result |
|---|---|
| no-referrer | Recognized; return this normalized token. |
| no-referrer-when-downgrade | Recognized; return this normalized token. |
| same-origin | Recognized; return this normalized token. |
| origin | Recognized; return this normalized token. |
| strict-origin | Recognized; return this normalized token. |
| origin-when-cross-origin | Recognized; return this normalized token. |
| strict-origin-when-cross-origin | Recognized; return this normalized token. |
| unsafe-url | Recognized; return this normalized token. |
| Output field | Meaning | Value type |
|---|---|---|
| result | Object containing the calculated or selected fields below. | object |
| result.recognizedAttributePolicy | Recognized Attribute Policy. Interpret its unit, sign, order or availability flag as explained above. | boolean |
| result.attributePolicy | Attribute Policy. Interpret its unit, sign, order or availability flag as explained above. | string |
{
"input": {
"actualReferrerPolicyAttributeValue": "strict-origin-when-cross-origin"
},
"output": {
"result": {
"recognizedAttributePolicy": true,
"attributePolicy": "strict-origin-when-cross-origin"
}
}
} Limitations and assumptions
The calculation uses the supplied observations and model inputs. It does not collect measurements, select a reference population or coefficient, or establish that the model applies to the actual case. The stated branch conditions and output units remain part of the result.
All fields require explicit values. Unexpected fields, wrong types, nonfinite numbers and sparse arrays are rejected. Alignment, bounds and supported-token rules are explained above; extremely large inputs or nonfinite results can also fail. Input errors differ from successful false comparisons, unavailable-domain flags and empty match lists.
The policy specification distinguishes policy tokens from the request processing that applies them. This tool recognizes one attribute token and does not calculate a request referrer.2
Alternative or Complementary methods
Use Referrer Extractor for a complementary operation: The HTTP Referer request field records a referring URL when a client sends one.
Use Content Encoding Detector for a complementary operation: Content-Encoding declares transformations applied to an HTTP representation, such as compression.
References
-
Referrer Attribute Parser — tool.io
-
W3C Referrer Policy — W3C
Similar or alternative tools
- Referrer Extractor
The HTTP Referer request field records a referring URL when a client sends one.
- Content Encoding Detector
Content-Encoding declares transformations applied to an HTTP representation, such as compression.