Enum EHCReferrerPolicy

    • Enum Constant Summary

      Enum Constants 
      Enum Constant Description
      NO_REFERRER
      The simplest policy is "no-referrer", which specifies that no referrer information is to be sent along with requests to any origin.
      NO_REFERRER_WHEN_DOWNGRADE
      The "no-referrer-when-downgrade" policy sends a request’s full referrerURL stripped for use as a referrer for requests: whose referrerURL and current URL are both potentially trustworthy URLs, or whose referrerURL is a non-potentially trustworthy URL. Requests whose referrerURL is a potentially trustworthy URL and whose current URL is a non-potentially trustworthy URL on the other hand, will contain no referrer information.
      NONE
      The empty string "" corresponds to no referrer policy, causing a fallback to a referrer policy defined elsewhere, or in the case where no such higher-level policy is available, falling back to the default referrer policy.
      ORIGIN
      The "origin" policy specifies that only the ASCII serialization of the request’s referrerURL is sent as referrer information when making both same-origin-referrer requests and cross-origin-referrer requests.
      ORIGIN_WHEN_CROSS_ORIGIN
      The "origin-when-cross-origin" policy specifies that a request’s full referrerURL is sent as referrer information when making same-origin-referrer requests, and only the ASCII serialization of the origin of the request’s referrerURL is sent as referrer information when making cross-origin-referrer requests.
      SAME_ORIGIN
      The "same-origin" policy specifies that a request’s full referrerURL is sent as referrer information when making same-origin-referrer requests.
      STRICT_ORIGIN
      The "strict-origin" policy sends the ASCII serialization of the origin of the referrerURL for requests: whose referrerURL and current URL are both potentially trustworthy URLs, or whose referrerURL is a non-potentially trustworthy URL. Requests whose referrerURL is a potentially trustworthy URL and whose current URL is a non-potentially trustworthy URL on the other hand, will contain no referrer information.
      STRICT_ORIGIN_WHEN_CROSS_ORIGIN
      The "strict-origin-when-cross-origin" policy specifies that a request’s full referrerURL is sent as referrer information when making same-origin-referrer requests, and only the ASCII serialization of the origin of the request’s referrerURL when making cross-origin-referrer requests: whose referrerURL and current URL are both potentially trustworthy URLs, or whose referrerURL is a non-potentially trustworthy URL. Requests whose referrerURL is a potentially trustworthy URL and whose current URL is a non-potentially trustworthy URL on the other hand, will contain no referrer information.
      UNSAFE_URL
      The "unsafe-url" policy specifies that a request’s full referrerURL is sent along for both same-origin-referrer requests and cross-origin-referrer requests.
    • Field Summary

      Fields 
      Modifier and Type Field Description
      static EHCReferrerPolicy DEFAULT
      Default policy: strict-origin-when-cross-origin
    • Enum Constant Detail

      • NONE

        public static final EHCReferrerPolicy NONE
        The empty string "" corresponds to no referrer policy, causing a fallback to a referrer policy defined elsewhere, or in the case where no such higher-level policy is available, falling back to the default referrer policy. This happens in Fetch’s main fetch algorithm, for example.
      • NO_REFERRER

        public static final EHCReferrerPolicy NO_REFERRER
        The simplest policy is "no-referrer", which specifies that no referrer information is to be sent along with requests to any origin. The header Referer will be omitted entirely.
      • NO_REFERRER_WHEN_DOWNGRADE

        public static final EHCReferrerPolicy NO_REFERRER_WHEN_DOWNGRADE
        The "no-referrer-when-downgrade" policy sends a request’s full referrerURL stripped for use as a referrer for requests:
        • whose referrerURL and current URL are both potentially trustworthy URLs, or
        • whose referrerURL is a non-potentially trustworthy URL.
        Requests whose referrerURL is a potentially trustworthy URL and whose current URL is a non-potentially trustworthy URL on the other hand, will contain no referrer information. A Referer HTTP header will not be sent.
      • SAME_ORIGIN

        public static final EHCReferrerPolicy SAME_ORIGIN
        The "same-origin" policy specifies that a request’s full referrerURL is sent as referrer information when making same-origin-referrer requests.
        Cross-origin-referrer requests, on the other hand, will contain no referrer information. A Referer HTTP header will not be sent.
      • ORIGIN

        public static final EHCReferrerPolicy ORIGIN
        The "origin" policy specifies that only the ASCII serialization of the request’s referrerURL is sent as referrer information when making both same-origin-referrer requests and cross-origin-referrer requests.
      • STRICT_ORIGIN

        public static final EHCReferrerPolicy STRICT_ORIGIN
        The "strict-origin" policy sends the ASCII serialization of the origin of the referrerURL for requests:
        • whose referrerURL and current URL are both potentially trustworthy URLs, or
        • whose referrerURL is a non-potentially trustworthy URL.
        Requests whose referrerURL is a potentially trustworthy URL and whose current URL is a non-potentially trustworthy URL on the other hand, will contain no referrer information. A Referer HTTP header will not be sent.
      • ORIGIN_WHEN_CROSS_ORIGIN

        public static final EHCReferrerPolicy ORIGIN_WHEN_CROSS_ORIGIN
        The "origin-when-cross-origin" policy specifies that a request’s full referrerURL is sent as referrer information when making same-origin-referrer requests, and only the ASCII serialization of the origin of the request’s referrerURL is sent as referrer information when making cross-origin-referrer requests.
      • STRICT_ORIGIN_WHEN_CROSS_ORIGIN

        public static final EHCReferrerPolicy STRICT_ORIGIN_WHEN_CROSS_ORIGIN
        The "strict-origin-when-cross-origin" policy specifies that a request’s full referrerURL is sent as referrer information when making same-origin-referrer requests, and only the ASCII serialization of the origin of the request’s referrerURL when making cross-origin-referrer requests:
        • whose referrerURL and current URL are both potentially trustworthy URLs, or
        • whose referrerURL is a non-potentially trustworthy URL.
        Requests whose referrerURL is a potentially trustworthy URL and whose current URL is a non-potentially trustworthy URL on the other hand, will contain no referrer information. A Referer HTTP header will not be sent.
      • UNSAFE_URL

        public static final EHCReferrerPolicy UNSAFE_URL
        The "unsafe-url" policy specifies that a request’s full referrerURL is sent along for both same-origin-referrer requests and cross-origin-referrer requests.
    • Method Detail

      • values

        public static EHCReferrerPolicy[] values()
        Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:
        for (EHCReferrerPolicy c : EHCReferrerPolicy.values())
            System.out.println(c);
        
        Returns:
        an array containing the constants of this enum type, in the order they are declared
      • valueOf

        public static EHCReferrerPolicy valueOf​(String name)
        Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)
        Parameters:
        name - the name of the enum constant to be returned.
        Returns:
        the enum constant with the specified name
        Throws:
        IllegalArgumentException - if this enum type has no constant with the specified name
        NullPointerException - if the argument is null
      • getAttrValue

        @Nonnull
        @Nonempty
        public String getAttrValue()
        Specified by:
        getAttrValue in interface com.helger.xml.microdom.IHasAttributeValue