added cache-buster to template xhr urls -- closed #1392

v1.18.x
Julian Lam 11 years ago
parent 7c00bce63c
commit 126260a027

@ -209,7 +209,7 @@ var ajaxify = ajaxify || {};
callback(templates.cache[template]);
} else {
$.ajax({
url: RELATIVE_PATH + '/templates/' + template + '.tpl',
url: RELATIVE_PATH + '/templates/' + template + '.tpl' + (config['cache-buster'] ? '?v=' + config['cache-buster'] : ''),
type: 'GET',
success: function(data) {
callback(data.toString());

@ -39,6 +39,7 @@ apiController.getConfig = function(req, res, next) {
config.defaultLang = meta.config.defaultLang || 'en_GB';
config.environment = process.env.NODE_ENV;
config.isLoggedIn = !!req.user;
config['cache-buster'] = meta.config['cache-buster'] || '';
if (!req.user) {
if (res.locals.isAPI) {

Loading…
Cancel
Save