Feature: Add ETag support
This is a feature I requested and used in rust-embed: https://github.com/pyrossh/rust-embed/issues/140
Would be nice to have it here too.
- [ ] Update the generator to save LastModified
- [ ] Update the generator (or just ad a lazy method) to provide a sha-256 hash of the bytes.
- [ ] Update the oak helpers to properly serve requests w.r.t. Tag/Last-Modified
Not sure how I should handle LastModified for the ESBuilder plugin. I guess we could always just emit the current date, but might result in lots of spurious updates to that line in the file.
OTOH, I suppose if we cared about clean Git history we wouldn't be constantly checking in bundles of our code. 🤪
I would love to get support for this.
I'm exploring using jsr has a way to publish websites / apps: https://dash.deno.com/playground/val-town-docs
You can even run these websites locally:
deno serve jsr:@pomdtr/[email protected]
Currently I use some very basic cache-control:
https://jsr.io/@pomdtr/val-town-docs/0.0.4/mod.ts#L24
But i would prefer to use Last-Modified headers.