Error int Failed to set referrer policy

I am getting the following error in my chrome console for the Wordpress site I'm working on.

Failed to set the referrer policy: the value ' http://example.com/comic/ ' is not one of 'always', 'default', 'never', 'without referral', 'without referral-on-demotion', 'origin', 'origin-when-crossorigin' or 'unsafe-url'. The policy of referrals was left unchanged.

Link to this line in an <head>HTML document ...

<meta name="Referrer" content="http://example.com/comic/" />

I view the page through http, not through https.

What is causing this problem and how can I fix it?

+13
source share
5 answers

Go to your .htaccess file and change the following:

Header set Referrer-Policy ""

at

Header set Referrer-Policy "origin"

This should solve the problem.

The reason is more than likely because you do not have the correct permissions on your .htaccess file, which allows w3tc to make the necessary changes.

+18
source

Here is the definition taken from the specification :

, Referer , . , .

, , ( URL) .

content :

  • no-referrer , , . .

  • no-referrer-when-downgrade Referrer URL, ( URL- https URL- http, )

  • same-origin , URL, , . .

  • origin , ( , ) URL , https://moz.com/example.html https://moz.com .

  • origin-when-cross-origin , origin cross-origin, URL .

  • unsafe-url , URL-, , , .
    , , TLS, .

  • "" , , , , , no-referrer-when-downgrade.

  • always unsafe-url.

+6

.htaccess :

<IfModule mod_headers.c>
    Header set Referrer-Policy ""
</IfModule>

<IfModule mod_headers.c>
    Header set Referrer-Policy "origin"
</IfModule>
+5

Chrome Inspection Wordpress, W3 Total Cache. " : " " " "," - "," "," --- ""

.htaccess, . Chrome Inspection Console, .

W3 β†’ Cache-> Referrer Policy-> , .

Selecting 'origin' from the drop-down list led to an update of .htaccess with the same value of 'origin' W3 Total Cache Pluginn Console

+3
source

"Referer" as a title is written without a double R. Perhaps with a double R, it corresponds to a different title than the one you have in mind.

+1
source

Source: https://habr.com/ru/post/1657193/


All Articles