Giter VIP home page Giter VIP logo

Comments (6)

 avatar commented on May 14, 2024

I put in a last-modified header but quite possibly it doesn't work:

https://github.com/substack/node-browserify/blob/master/index.js#L107

from browserify.

Morriz avatar Morriz commented on May 14, 2024

Your last modified is always returning the time of the request. You probably want to keep the time of bundle creation in memory, and reset it when you update the bundle (like when a file is changed and the 'watch' option is set).

Also, you are not setting the Etag header, so in essence you're not adhering to the specs I think.

Thanks again for all the work ;)


On 27Jul, 2011, at 19:22 , substack wrote:

I put in a last-modified header but quite possibly it doesn't work:

https://github.com/substack/node-browserify/blob/master/index.js#L107

Reply to this email directly or view it on GitHub:
#48 (comment)

from browserify.

Morriz avatar Morriz commented on May 14, 2024

Did you look into this yet? I will do it myself if I can find the time, but that won't happen soon. Maybe next week...

I am almost certain you have to return a 304 if the client asks for a cache validation.

from browserify.

bminer avatar bminer commented on May 14, 2024

+1 for this. Browserify should cache the bundle, and if there are no changes to the source files, it should send 304. It should also set Last-Modified headers, etc.

from browserify.

jazzzz avatar jazzzz commented on May 14, 2024

I don't think browserify should handle the caching. A middleware or a reverse proxy handle this perfectly, all they need is the Last-Modified header.

from browserify.

 avatar commented on May 14, 2024

middleware is gone in v2

from browserify.

Related Issues (20)

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.