diff --git a/js/masses-and-springs-basics-config.js b/js/masses-and-springs-basics-config.js index 040b56d..7147a10 100644 --- a/js/masses-and-springs-basics-config.js +++ b/js/masses-and-springs-basics-config.js @@ -46,6 +46,6 @@ require.config( { TWIXT: '../../twixt/js' }, - // optional cache bust to make browser refresh load all included scripts, can be enabled with ?cacheBust + // Cache busting is applied by default, but can be disabled via ?cacheBust=false, see initialize-globals.js urlArgs: phet.chipper.getCacheBustArgs() } ); diff --git a/masses-and-springs-basics_en.html b/masses-and-springs-basics_en.html index 42b03e9..e152d61 100644 --- a/masses-and-springs-basics_en.html +++ b/masses-and-springs-basics_en.html @@ -29,9 +29,9 @@ const brandMatch = location.search.match( /brand=([^&]+)/ ); const brand = brandMatch ? decodeURIComponent( brandMatch[ 1 ] ) : 'adapted-from-phet'; - // matches "cacheBust" at the start of the string, as well as directly after "?" or "&" - const cacheBust = /(^|\?|&)cacheBust/.test( location.search ); - const queryAppend = cacheBust ? `?bust=${Date.now()}` : ''; + // Cache busting is applied by default, but can be disabled via ?cacheBust=false, see initialize-globals.js + const isCacheBustDisabled = /(^|\?|&)cacheBust=false/.test( location.search ); + const queryAppend = isCacheBustDisabled ? '' : `?bust=${Date.now()}`; // Preloads, with more included for phet-io brand let preloads = [