Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature: Add ETag support #1

Open
3 tasks
NfNitLoop opened this issue Feb 14, 2023 · 2 comments
Open
3 tasks

Feature: Add ETag support #1

NfNitLoop opened this issue Feb 14, 2023 · 2 comments

Comments

@NfNitLoop
Copy link
Owner

This is a feature I requested and used in rust-embed: pyrossh/rust-embed#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
@NfNitLoop
Copy link
Owner Author

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. 🤪

@pomdtr
Copy link
Contributor

pomdtr commented Jun 22, 2024

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

image

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants