From 5cbe5d909ba78eb585a7be31289fd00b1b7f4f99 Mon Sep 17 00:00:00 2001 From: Oliver Jowett Date: Sat, 17 Jan 2015 21:02:17 +0000 Subject: [PATCH] Don't cache receiver.json as it may change more frequently now (history size). --- public_html/script.js | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/public_html/script.js b/public_html/script.js index 739461f..89e6eb8 100644 --- a/public_html/script.js +++ b/public_html/script.js @@ -170,7 +170,11 @@ function initialize() { // Get receiver metadata, reconfigure using it, then continue // with initialization - $.getJSON('data/receiver.json') + $.ajax({ url: 'data/receiver.json', + timeout: 5000, + cache: false, + dataType: 'json' }) + .done(function(data) { if (typeof data.lat !== "undefined") { SiteShow = true; @@ -184,6 +188,7 @@ function initialize() { RefreshInterval = data.refresh; PositionHistorySize = data.history; }) + .always(function() { initialize_map(); start_load_history();