Change record status: 
Project: 
Introduced in branch: 
7.x
Introduced in version: 
7.25
Description: 

As of Drupal 7.25, content viewing counter statistics provided by the Statistics module can be configured to be deferred and collected asynchronously on the client-side. Site builders and administrators can enable this functionality by checking the "Use Ajax to increment the counter" checkbox on the statistics configuration form.

This configuration differs from the default, synchronous collection method in that the node hit counter is incremented using an Ajax callback after the page is loaded in a JavaScript-enabled browser, whereas previously, the node hit counter could only be incremented on the server-side every time a node page was generated by Drupal. Naturally, in this new configuration, users with JavaScript disabled, bots, and crawlers will not cause the node counter to increment.

This new configuration can improve website performance in situations where database write speed is low or overall database latency is high. On the other hand, this configuration has the potential to reduce scalability due to an overall increased number of requests/connections to Drupal.

For sites using an HTTP reverse proxy or other external cache (such as Varnish), the new configuration option may be especially beneficial because it will allow content pages served from the external HTTP cache to be recorded by the Statistics module, making the site statistics much more accurate than they previously were. However, it may also be especially risky, because the Ajax requests that record each page view will bypass the external cache and hit the web and database server directly, resulting in increased server load.

This change does not affect collection of access statistics, also provided by the Statistics module.

Impacts: 
Site builders, administrators, editors
Updates Done (doc team, etc.)
Online documentation: 
Not done
Theming guide: 
Not done
Module developer documentation: 
Not done
Examples project: 
Not done
Coder Review: 
Not done
Coder Upgrade: 
Not done
Other: 
Not done