shiffman / learningprocessing.com

New learningprocessing.com site
68 stars 21 forks source link

cdn.rawgit.com caches files #25

Closed shiffman closed 8 years ago

shiffman commented 8 years ago

Need to deal with the below. In light also of #23 I think it might actually just make sense for me to bulk copy/paste the latest LearningProcessing and LearningProcessing-p5.js repos here every so often.

The CDN caches files permanently based on their path. It ignores query strings. This is done both to improve performance and to make it possible for the CDN to handle massive amounts of traffic without causing excessive load on RawGit or GitHub's servers.

To ensure that the CDN always serves the version of the file you want, use a git tag or commit ref in the file's path instead of a branch name, and update the URL if you push a new version of the file.

So, instead of a URL like https://cdn.rawgit.com/user/repo/branch/file, use a URL like https://cdn.rawgit.com/user/repo/tag/file or https://cdn.rawgit.com/user/repo/commit/file.

shiffman commented 8 years ago

All sketches are now hosted locally in /code/LearningProcessing and /code/LearningProcessing-p5.js. Later they could be submodules, but this allows me to make local modifications for #23.