11

Task: Use random string in url to prevent cache.
Me: `<script src="lightbox.js?random"></script>`

Comments
  • 5
    FileName.js?cache={fileLastModifiedTime}

    force recache only on changes.
  • 0
    Why Not using etags?
  • 0
    You can also use timestamps, for example if u need resource from js and u dont know file mod time
Add Comment