TE
科技回声
首页24小时热榜最新最佳问答展示工作
GitHubTwitter
首页

科技回声

基于 Next.js 构建的科技新闻平台,提供全球科技新闻和讨论内容。

GitHubTwitter

首页

首页最新最佳问答展示工作

资源链接

HackerNews API原版 HackerNewsNext.js

© 2025 科技回声. 版权所有。

Ask HN: Any WordPress Developers here that can help me?

3 点作者 markcrazyhorse超过 10 年前
Hey there.<p>I&#x27;m trying to find out what cookies wordpress sets automatically for all users?<p>I&#x27;m creating a page count function (as I dont want to use yet another plugin) and at the moment it is counting everytime I press f5. I just want to be able to do it only once.<p>Thanks for your time. I would have usually put this on stackoverflow but the community isnt to fond of broadish questions nor ones without code &#x2F; specific problems.

4 条评论

giaour超过 10 年前
Any reason you want to do this in WP and not using a javascript solution like Google Analytics?<p>Backend page view tracking is not compatible with most forms of response caching.
peacemaker超过 10 年前
I write WordPress plugins for my business and if I want to manage cookies I use something like <a href="https://wordpress.org/plugins/wp-session-manager/" rel="nofollow">https:&#x2F;&#x2F;wordpress.org&#x2F;plugins&#x2F;wp-session-manager&#x2F;</a>. This will give you full control.
saluki超过 10 年前
You can set&#x2F;read your own cookies when developing on wordpress.<p>I usually us the jQuery cookie plugin for javascript.<p>You can set&#x2F;read cookies using php as well.
hsx超过 10 年前
I&#x27;m not too familiar with WordPress but couldn&#x27;t you just store the page count in the database and update it periodically?