Ready to get started?Download WordPress


Top 10 - Popular posts plugin for WordPress
how to disable the daily stats? (7 posts)

  1. postoffice33
    Posted 1 year ago #

    hi, if I am just interested in the global stats how to disable the daily stats in order to avoid the DB (select/insert/update) overheads?


  2. Ajay
    Plugin Author

    Posted 1 year ago #

    There isn't an easy way to do it. You will need to modify top-10-addcount.php.js to comment out or delete line 29,34,35


  3. postoffice33
    Posted 1 year ago #

    Hi, thanks for your reply. In fact analyzing your code I was thinking something like that.

    May be in the next version you can add a boolean option (daily yes/no) and simply change the 3 lines you mentioned with an 'if(daily_enabled) ...., right?

    I mean in a lot of cases you don't need daily stats and you can avoid the overhead (including the periodical maintenance of mysql tables - even I see is just a simple 'truncate').

  4. postoffice33
    Posted 1 year ago #

    I forgot to ask you one thing: I see the kind of AJAX request you do is like


    what about browser cache? Should you add a parameter with a timestamp (that is always different) to force the browser doing the request to the server? Something like:


    of course server-side you simplu ignore the top10_timestamp url parameter...

  5. Ajay
    Plugin Author

    Posted 1 year ago #

    Agreed on the daily turn off option. I've put it on the list of things to implement.

    I haven't noticed any problems with browser cache till date on this. If you refresh the page the hit will be tracked.

    Am still trying to find a better implementation of the AJAX request. It's the biggest issue currently in terms of performance.

  6. postoffice33
    Posted 1 year ago #


    I posted a new topic with the AJAX solution. May be you can incorporate the same in your plugin new version.

    The solution is also taking care of compatibility with W3 Total Cache.


  7. postoffice33
    Posted 1 year ago #

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic


No tags yet.