tizzle / aframe-orbit-controls-component

An Orbit Controls Component for A-Frame VR
https://tizzle.github.io/aframe-orbit-controls-component/
MIT License
74 stars 25 forks source link

rawgit CDN URL should use Tags #11

Closed morandd closed 7 years ago

morandd commented 7 years ago

BTW, as far as I understood the RawGit CDN, files are cached permanently based on their URL, and are never refreshed. I think this means that any web user who visits an AFrame page that uses the CDN hosted version of your orbit-controls with this URL cdn.rawgit.com/tizzle/aframe-orbit-controls-component/master/dist/aframe-orbit-controls-component.min.js

will never see an updated ".min.js" file, since even if the file changes upstream it is permanently cached on the CDN edge nodes.

I believe the solution is to add tags to your repo then use "/vX.Y.Z/" instead of "/master" in the URL for the CDN.

Other CDNs have a mechanism to invalidate the edge node caches, but rawgit does not offer this.

To introduce versioning you can use git tags

by default git push does not upload tags, so to get tags to GitHub you must also do: git push origin --tags

health warning: I am not 100% sure about all this.

tizzle commented 7 years ago

I just checked and all my changes from the last tag show up fine.

morandd commented 7 years ago

indeed! yes it seems so.

strange... the rawgit page says, "Use a specific tag or commit hash in the URL (not a branch). Files are cached permanently based on the URL. Query strings are ignored." so I must be missing something. anyway, no harm, no foul; glad it works.

tizzle commented 7 years ago

i can update it anyway. this is no big issue on my part and it really makes sure you always get the right files.