From: Coleman Watts Date: Sat, 9 Feb 2019 02:54:20 +0000 (-0500) Subject: Append cache-buster to dynamically loaded scripts X-Git-Url: https://vcs.fsf.org/?a=commitdiff_plain;h=f62c1fa7e43154d1aa8fcf8fc07450470e3dfeeb;p=civicrm-core.git Append cache-buster to dynamically loaded scripts --- diff --git a/js/Common.js b/js/Common.js index de326cda0e..01bc7572ba 100644 --- a/js/Common.js +++ b/js/Common.js @@ -256,7 +256,7 @@ if (!CRM.vars) CRM.vars = {}; CRM.CMSjQuery = window.jQuery; window.jQuery = CRM.$; } - script.src = url; + script.src = url + (_.includes(url, '?') ? '&r=' : '?r=') + CRM.config.resourceCacheCode; document.getElementsByTagName("head")[0].appendChild(script); } return scriptsLoaded[url];