Skip to content

Commit

Permalink
Apply new defaults for cache busting to preloads, see #541
Browse files Browse the repository at this point in the history
  • Loading branch information
samreid committed Oct 4, 2019
1 parent 9863038 commit 7df8c48
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions templates/sim-development.html
Original file line number Diff line number Diff line change
Expand Up @@ -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 = {{PRELOADS}};
Expand Down

0 comments on commit 7df8c48

Please sign in to comment.