RichardLitt / open-source-protocol

:unlock: Open up web development
https://osprotocol.com
MIT License
44 stars 5 forks source link

Should we use etags to specify live commit? #19

Closed RichardLitt closed 9 years ago

RichardLitt commented 9 years ago

Etags are part of the HTTP protocol, meant for pointing to a specific version of a resource. It seems natural, then, that we ought to use etags to point to a particular version of a repository which the live site reflects.

dydx commented 9 years ago

Would you propose this into the OSP with the cache validation aspect in mind, or just as a reference for which commit is live?

I could see it being similar to version query strings for assets, but I don't know of a relatively idiomatic or easy way to implement the caching part. I think keeping a meta tag that references the commit id is a solid idea, though.

RichardLitt commented 9 years ago

I think that caching is better done elsewhere, and due to dynamic websites having a cache ID in the head probably wouldn't help much for anyone. Commit IDs, though are not as dynamic, and I think that would be a smart idea.

RichardLitt commented 9 years ago

I'm not sure that etags are relevant to OSP. With that, and with bbb2ffe63776b6e9df8364bf2b9ad5031f1b86dc, which allows os:commit, I think we are good for now. Reopen as you see fit, anyone.