先作为主站备份 源站:https://my.toho.red

I wrote a script using my poor JavaScript knowledge to track the number of real visitors.

Taking advantage of the free time after the college entrance examination, I started learning web development and mini-programming. Shortly after learning AJAX, I decided to write a small project as a summary, and that's how this project came about.

This project uses the method of frontend requesting backend and backend recording data to track visitor statistics, giving static websites the ability to display visitor data. The project also utilizes cookies to prevent duplicate data submissions and ensure accurate visitor count. Originally, I only intended to use it for my own website, but later I decided to make it open source (although it doesn't really matter whether the JavaScript script is open source or not).

The backend is built on Tencent Cloud's serverless cloud functions, ensuring fast access speed within China. After testing, the response time is consistently under 50ms, which I think is quite good.

Project link: https://github.com/zhishixiang/visitorStatistic. Since I just started learning, the code is very bad, so please go easy on me.


--- Dude, your password has been leaked.

Ownership of this post data is guaranteed by blockchain and smart contracts to the creator alone.