Giter VIP home page Giter VIP logo

Comments (6)

jpsingleton avatar jpsingleton commented on June 18, 2024 1

This is available in the latest release, ignoring the generated at timestamp when hashing.

from huxley2.

davwheat avatar davwheat commented on June 18, 2024 1

Thank you so much! :)

from huxley2.

jpsingleton avatar jpsingleton commented on June 18, 2024

Huxley is just a proxy and considered feature-complete. It doesn't hold state and doesn't know if data is stale or not. You would probably need to build something on top of the push port to implement this feature.

from huxley2.

davwheat avatar davwheat commented on June 18, 2024

There's no need to know if data is stale or not. The response just needs to be hashed before it is sent, and if the hash is the same as supplied in the ETag request header, Huxley can respond with a 304 code.

The objective isn't to prevent unnecessary API calls from the server to NRE, but to prevent unnecessary data transfer when no data has changed so the browser can use its own cached ETagged copy.

from huxley2.

jpsingleton avatar jpsingleton commented on June 18, 2024

Thanks for clarifying. Looks like Mads has a gist for some ETag middleware so I might see if that still works.

from huxley2.

jpsingleton avatar jpsingleton commented on June 18, 2024

I've added this but it's not quite that simple. NRE add a millisecond precision "generated at" timestamp to every response so the hash will always be different and so not useful as an ETag.

from huxley2.

Related Issues (13)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.