From 2cbcb9d086dc277e8aa14b97e4f15c65b230ec58 Mon Sep 17 00:00:00 2001 From: rlx <0x0073@0x2620.org> Date: Wed, 18 Apr 2012 08:56:31 +0000 Subject: [PATCH] never load Ox.js and Ox.UI json files from cache --- source/Ox.UI/Ox.UI.js | 4 ++-- source/Ox.js | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/source/Ox.UI/Ox.UI.js b/source/Ox.UI/Ox.UI.js index ad2d621a..2853c025 100644 --- a/source/Ox.UI/Ox.UI.js +++ b/source/Ox.UI/Ox.UI.js @@ -207,7 +207,7 @@ Ox.load.UI = function(options, callback) { Ox.loadFile(Ox.PATH + '/Ox.UI/jquery/jquery.js', function() { initUI(); - Ox.getJSON(Ox.UI.PATH + 'json/Ox.UI.files.json', function(files) { + Ox.getJSON(Ox.UI.PATH + 'json/Ox.UI.files.json?' + Ox.random(1000000), function(files) { var promises = [], themes = {}; files.forEach(function(file) { var dfd = new $.Deferred(); @@ -228,7 +228,7 @@ Ox.load.UI = function(options, callback) { promises.push(dfd.promise()); Ox.getJSON(Ox.UI.PATH + 'json/Ox.UI.image' + ( options.loadImages ? 'Data' : '' - ) + 'URLs.json', function(images) { + ) + 'URLs.json?' + Ox.random(1000000), function(images) { imageURLs = images; Ox.forEach(imageURLs, function(url, key) { imageNames[url] = key.split('/')[1]; diff --git a/source/Ox.js b/source/Ox.js index 6a0971e4..e3164937 100644 --- a/source/Ox.js +++ b/source/Ox.js @@ -40,7 +40,7 @@ window.Ox = { function loadJSON(callback) { var req = new XMLHttpRequest(); - req.open('GET', path + 'Ox/json/Ox.json', true); + req.open('GET', path + 'Ox/json/Ox.json?' + Ox.random(1000000), true); req.onreadystatechange = function() { if (req.readyState == 4) { if (req.status == 200) {