You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When the response is still “fresh” in the client’s cache true is returned, otherwise false is returned to indicate that the client cache is now stale and the full response should be sent. When a client sends the Cache-Control: no-cache request header to indicate an end-to-end reload request, this module will return false to make handling these requests transparent HTTP/1.1 Caching Specification.
This is a proposal to finish the ctx.Fresh() method along with ETag header support.
The
Fresh
method originates from expressjs/req.fresh but we never finished it context#freshWhen the response is still “fresh” in the client’s cache
true
is returned, otherwisefalse
is returned to indicate that the client cache is now stale and the full response should be sent.When a client sends the Cache-Control: no-cache request header to indicate an end-to-end reload request, this module will return
false
to make handling these requests transparent HTTP/1.1 Caching Specification.Express uses the jshttp/fresh module, source code MIT.
I found a Go net/http version from go-http-utils MIT
It would be a good idea to implement ETag support within the Fiber core before starting on the
Fresh
method.jshttp/etag MIT
go-http-utils/etag MIT
expressjs/send-etag
expressjs/weak-etag
expressjs/strong-etag
Let's add this to the project board 💪 @gofiber/maintainers
The text was updated successfully, but these errors were encountered: