From e1d71b27bc846c921d13f7347ce914304df71131 Mon Sep 17 00:00:00 2001 From: j <0x006A@0x2620.org> Date: Thu, 5 Sep 2013 11:09:30 +0000 Subject: [PATCH] only force reload in debug mode, use version otherwise --- source/Ox.js | 1 + source/Ox/js/Request.js | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/source/Ox.js b/source/Ox.js index 8feeb26d..95eeccc4 100644 --- a/source/Ox.js +++ b/source/Ox.js @@ -23,6 +23,7 @@ loadScriptsSerial(data.files, function() { Ox.LOCALES = data.locales; Ox.VERSION = data.version; + Ox.DEBUG = true; Ox.forEach(previousOx, function(value, key) { if (Ox.isUndefined(Ox[key])) { Ox[key] = value; diff --git a/source/Ox/js/Request.js b/source/Ox/js/Request.js index 640a932a..a823de38 100644 --- a/source/Ox/js/Request.js +++ b/source/Ox/js/Request.js @@ -113,7 +113,7 @@ Ox.getFile = (function() { ); element[ type == 'css' ? 'href' : 'src' - ] = file + '?' + Ox.random(1000000); + ] = file + '?' + (Ox.DEBUG ? Ox.random(1000000) : Ox.VERSION); element.type = type == 'css' ? 'text/css' : 'text/javascript'; if (type == 'css') { element.rel = 'stylesheet';