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() {
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];

View file

@ -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) {