[www-doc] [Git][VideoLAN.org/websites][master] 2 commits: stats: stats are now refreshed every day and are accurate

Ludovic Fauvet gitlab at videolan.org
Sun Feb 14 13:18:27 CET 2016


Ludovic Fauvet pushed to branch master at VideoLAN organization / websites


Commits:
c6bfe206 by Ludovic Fauvet at 2016-02-14T12:52:29Z
stats: stats are now refreshed every day and are accurate

- - - - -
038c5903 by Ludovic Fauvet at 2016-02-14T13:17:36Z
stats: auto-reconnect the websocket

- - - - -


1 changed file:

- www.videolan.org/vlc/stats/downloads.php


Changes:

=====================================
www.videolan.org/vlc/stats/downloads.php
=====================================
--- a/www.videolan.org/vlc/stats/downloads.php
+++ b/www.videolan.org/vlc/stats/downloads.php
@@ -6,11 +6,20 @@
 ?>
 
 <script>
+    var ws;
+
+    function openWSCounterSocket() {
+        if (ws === undefined || ws.readyState === undefined || ws.readyState > 1) {
+            ws = new WebSocket("wss://get.videolan.org/wscounter");
+            ws.onmessage = function(event) {
+                $('#wscounter').text(event.data);
+            };
+        }
+    }
+
     $(function() {
-        var ws = new WebSocket("wss://get.videolan.org/wscounter");
-        ws.onmessage = function(event) {
-            $('#wscounter').text(event.data);
-        };
+       openWSCounterSocket();
+        setInterval(openWSCounterSocket, 5000);
     });
 </script>
 
@@ -18,9 +27,9 @@
     <h1>VLC download statistics</h1>
 
     <p>These stats were started at the end of February 2005 and are likely
-       to be inaccurate.</p>
+       to be inaccurate before this date.</p>
 
-    <p>Stats are updated every few days.</p>
+    <p>Stats are updated every day from our download servers.</p>
 
     <p>We don't show Linux download statistics as most downloads for this
        OS are made through distributions.</p>



View it on GitLab: https://code.videolan.org/VideoLAN.org/websites/compare/b65f3d8a692b061902514b5aa891109819ef6e73...038c59033a515e0645d4cb52299ffbe8b311cdd4
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.videolan.org/pipermail/www-doc/attachments/20160214/51d1ed17/attachment.html>


More information about the www-doc mailing list