davidhampgonsalves / hugo-black-and-light-theme

A High contrast, text oriented, performant and Javascript-free theme for Hugo.
https://themes.gohugo.io/themes/hugo-black-and-light-theme/
GNU General Public License v3.0
190 stars 94 forks source link

Question on Referrer Policy #6

Closed ghost closed 7 years ago

ghost commented 7 years ago

Hello. Beautiful theme. I especially appreciate the screenshot presentation.

Question about the referrer policy in use. From what I was reading on W3C using "no-referrer" will prevent the "Referer" [sic] header on same- and cross-domain HTTP requests. As a result, users of this theme who hyperlink to other sites will not appear in Google Analytics (and may not appear in the Search Consoles). There are also potential caching implications as well. Is the intention using the no-referrer Referral Policy to be incognito, so to speak, when linking to other sites, or are there other reasons? Just curious. I'd love to hear your thoughts. Best regards.

davidhampgonsalves commented 7 years ago

I didn't give it a lot of thought but I was prioritising my users privacy which is also why GA is disabled by default. I'd be open to changing it though.

I didn't think it would affect cachability though, can you expand on that?

ghost commented 7 years ago

From the W3C docs linked above:

If a document at https://example.com/page.html sets a policy of "no-referrer", then navigations to https://example.com/ (or any other URL) would send no Referer header.

Following the Referer link lands on an IETF page which states the following in para 2 (emphasis mine):

The Referer header field allows servers to generate back-links to other resources for simple analytics, logging, optimized caching, etc.

I'm not sure how to interpret that. But it did raise my eyebrow, so I thought I'd ask. Thanks for the info!