Hi, i was wondering what the best way is to implement a hit counter for articles, products, etc. Now if someone visits the page the counter just adds one in the database. If someone refreshes the page it counts continuously, misleading results, and unnecessary reads, writes.
I was thinking of storing their ip, but i don't know how to model this in mysql. If i make a db record for each hit it will be enormous.
I have read this article: http://stackoverflow.com/questions/1535261/how-to-write-an-efficient-hit-counter-for-websites
The best answer was using a log and then update this log to db. But then again.
What is the best way to determine a new hit, is this with IP or another variable. And what is an acceptable amount of time to log the hit of particular user again.
Any other types of implementations are welcome too.