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

  1. Prepare the measurements or independently established model inputs described below, with matching units and observation scope.
  2. Enter the required fields and run Referrer Attribute Parser.
  3. Read the result fields using the formula, output units, signs and ordering explained below.
  4. Correct any rejected inputs and rerun; interpret the result within the stated model and its assumptions.
Input fieldMeaningValue typeRequirement
actualReferrerPolicyAttributeValueActual Referrer Policy Attribute Value. Use the units and matching context stated in the calculation below.stringRequired; 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 policyResult
no-referrerRecognized; return this normalized token.
no-referrer-when-downgradeRecognized; return this normalized token.
same-originRecognized; return this normalized token.
originRecognized; return this normalized token.
strict-originRecognized; return this normalized token.
origin-when-cross-originRecognized; return this normalized token.
strict-origin-when-cross-originRecognized; return this normalized token.
unsafe-urlRecognized; return this normalized token.
Output fieldMeaningValue type
resultObject containing the calculated or selected fields below.object
result.recognizedAttributePolicyRecognized Attribute Policy. Interpret its unit, sign, order or availability flag as explained above.boolean
result.attributePolicyAttribute Policy. Interpret its unit, sign, order or availability flag as explained above.string
json
{
  "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

  1. Referrer Attribute Parser — tool.io

  2. 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.

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