NodeJS/express: Cache and 304 status code
Easiest solution: app.disable(‘etag’); Alternate solution here if you want more control: http://vlasenko.org/2011/10/12/expressconnect-static-set-last-modified-to-now-to-avoid-304-not-modified/
Easiest solution: app.disable(‘etag’); Alternate solution here if you want more control: http://vlasenko.org/2011/10/12/expressconnect-static-set-last-modified-to-now-to-avoid-304-not-modified/
When the browser puts something in its cache, it also stores the Last-Modified or ETag header from the server. The browser then sends a request with the If-Modified-Since or If-None-Match header, telling the server to send a 304 if the content still has that date or ETag. The server needs some way of calculating a … Read more
First, this is not an error. The 3xx denotes a redirection. The real errors are 4xx (client error) and 5xx (server error). If a client gets a 304 Not Modified, then it’s the client’s responsibility to display the resouce in question from its own cache. In general, the proxy shouldn’t worry about this. It’s just … Read more
Without handling cache headers manually, it is not possible. Normally, 304 responses are not made available through the XHR API: For 304 Not Modified responses that are a result of a user agent generated conditional request the user agent must act as if the server gave a 200 OK response with the appropriate content. jQuery … Read more