How can I visit a webpage without incrementing the hit counter?
I frequently visit a certain page on the web to view the hit-counter, but my visit is counted every time and it's inflating the number of actual hits. Is there a way to visit the page without adding another hit to the hit 开发者_运维百科counter?
In this case, the hit counter implementation is broken. Hits should only be counted by unique users usually. Otherwise any goon could set a reload bot and blow out the numbers on the counter. A real counting solution is going to be using something like the analytics API from google (or other analytics implementations) which will give you dashboard access to the real visibility of the site.
There is no perfect way to solve it. But a pretty good approach is setting cookies on visitor's browser. Then, keep counting only if that cookie did not visit your page yet. The biggest problem with this approach is that keeping track of every single visitor on your page could potentially lead you to a huge database.
if you want implement the hit counter yourself then what you can do is use 'sessions' and only increment hit counter when the session isn't present in the server with existing ip. but i don't think there is a way for you to control hit counter on someone else's website.
Try to add your IP to hit counter and block it in the code or you can use an javascript disable plugin .. web developer plugin for FF and chrome does that too.
精彩评论