Created
January 30, 2015 16:38
-
-
Save shellscape/476d72d3d8d751d57e6c to your computer and use it in GitHub Desktop.
Cache Busting a Script in a Five Minute Interval
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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