Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

不蒜子页面浏览量展示错误 #439

Open
he-sb opened this issue Aug 4, 2023 · 1 comment
Open

不蒜子页面浏览量展示错误 #439

he-sb opened this issue Aug 4, 2023 · 1 comment

Comments

@he-sb
Copy link

he-sb commented Aug 4, 2023

刚发布的文章,浏览量直接就是 1w 多,同时整个博客站点的 UV 和 PV 均是正常的,不太科学。。

image

主题版本:release-5.0.0
配置信息:

displayBusuanziPagePV = true
busuanziPagePVIcon = "eye"

查找资料发现了 这篇博客,应该就是因为这个原因导致的:

image

@he-sb
Copy link
Author

he-sb commented Aug 5, 2023

解决方法(在 Chromium 内核的浏览器已验证有效)

主题文件夹内的 sites/themes/meme/layouts/partials/custom/head.html 文件,默认是空的,在里面加一行:

<meta name="referrer" content="no-referrer-when-downgrade">

就好了

Chromium 内核的浏览器再次打开网站后,可以看到文章计数,以及控制台中的 Referrer Policy 和 Referrer 都正常了:

image

image

遗留问题

但是 Firefox 116.0 上问题依旧,不知为何 Referrer Policy 始终是 strict-origin-when-cross-origin,即使 head 中已经指定了 referrer 策略:

image

image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant