never load Ox.js and Ox.UI json files from cache

This commit is contained in:
rlx 2012-04-18 08:56:31 +00:00
parent 02696ae741
commit 2cbcb9d086
2 changed files with 3 additions and 3 deletions

View file

@ -207,7 +207,7 @@ Ox.load.UI = function(options, callback) {
Ox.loadFile(Ox.PATH + '/Ox.UI/jquery/jquery.js', function() { Ox.loadFile(Ox.PATH + '/Ox.UI/jquery/jquery.js', function() {
initUI(); 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 = {}; var promises = [], themes = {};
files.forEach(function(file) { files.forEach(function(file) {
var dfd = new $.Deferred(); var dfd = new $.Deferred();
@ -228,7 +228,7 @@ Ox.load.UI = function(options, callback) {
promises.push(dfd.promise()); promises.push(dfd.promise());
Ox.getJSON(Ox.UI.PATH + 'json/Ox.UI.image' + ( Ox.getJSON(Ox.UI.PATH + 'json/Ox.UI.image' + (
options.loadImages ? 'Data' : '' options.loadImages ? 'Data' : ''
) + 'URLs.json', function(images) { ) + 'URLs.json?' + Ox.random(1000000), function(images) {
imageURLs = images; imageURLs = images;
Ox.forEach(imageURLs, function(url, key) { Ox.forEach(imageURLs, function(url, key) {
imageNames[url] = key.split('/')[1]; imageNames[url] = key.split('/')[1];

View file

@ -40,7 +40,7 @@ window.Ox = {
function loadJSON(callback) { function loadJSON(callback) {
var req = new XMLHttpRequest(); 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() { req.onreadystatechange = function() {
if (req.readyState == 4) { if (req.readyState == 4) {
if (req.status == 200) { if (req.status == 200) {