Skip to content

Instantly share code, notes, and snippets.

@shellscape
Created January 30, 2015 16:38
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save shellscape/476d72d3d8d751d57e6c to your computer and use it in GitHub Desktop.
Save shellscape/476d72d3d8d751d57e6c to your computer and use it in GitHub Desktop.
Cache Busting a Script in a Five Minute Interval
var now = new Date(),
month = now.getMonth(),
day = now.getDate(),
year = now.getFullYear(),
hours = now.getHours(),
minutes = now.getMinutes(),
buster = '' + month + day + year + hours;
buster += (minutes - (minutes % 5));
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment