Created
June 1, 2015 07:23
-
-
Save zackexplosion/8b1b96663a93129c741c to your computer and use it in GitHub Desktop.
simple javascript version cache control
This file contains 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 ENV = 'production'; | |
var version = Date.now(); | |
if(ENV == 'production'){ | |
version = '20150601'; | |
} | |
var url = 'https://gist.github.com/cstony0917/425c39beb6ec83662e26.js'; | |
$.ajax(url + '?v=' + version); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment