-
-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
browserify is not sending correct caching headers #48
Comments
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 |
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:
|
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. |
+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. |
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. |
middleware is gone in v2 |
I would really love to be able to set http caching headers on the browserify response. It now has to resend every time.
Or am I missing something here?
Thanks for all the fantastic work btw!
The text was updated successfully, but these errors were encountered: