More reliable statistics.js: retry after 2 s when request fails

Created on 14 July 2012, over 12 years ago
Updated 30 April 2024, 10 months ago
(function ($) {

  "use strict";

  $(document).ready(function() {
    var nid = Drupal.settings.statistics.nid;
    var basePath = Drupal.settings.basePath;
    $.ajax({
      type: "POST",
      cache: false,
      url: basePath+"core/modules/statistics/statistics.php",
      data: "nid="+nid
    });
  });
})(jQuery);

1. This is slow down the stat record.

  $(document).ready(function() {

2. missing error handler.

(3. GET method is better in performance)

πŸ“Œ Task
Status

Needs work

Version

1.0

Component
StatisticsΒ  β†’

Last updated 18 days ago

No maintainer
Created by

πŸ‡­πŸ‡°Hong Kong droplet

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

Production build 0.71.5 2024