http - Is ETag returned in a 304 response? -


i'm building node.js app - reguarly, once day - fetches data external web server (using "request" package).

i want avoid fetching same data twice, keep track of each resource etag when first downloading (200 status code).

then, when fetching again (next day) resource add if-none-match header saved etag in request.

since suspect sometime receive 200 status code (instead of expected 304) remote web server if resource contents not modified, ask if should expect resource etag returned in 304 response (and how in request response...), try debug issue.

please have @ appropriate rfc 2616.

the response must include following header fields: (...)

  • etag and/or content-location, if header have been sent in 200 response same request

so if etag header returned 200 ok status code must included in 304 not modified response.


Comments

Popular posts from this blog

sql - VB.NET Operand type clash: date is incompatible with int error -

SVG stroke-linecap doesn't work for circles in Firefox? -

python - TypeError: Scalar value for argument 'color' is not numeric in openCV -