GitHub Conditional GETs: Replace or Reuse a Stored Response

A compact response-handling table and hypothetical ETag trace for reviewing GitHub polling,.

A generic network server beside a monitor showing a document symbol and the status 304
AI-generated illustration · A conceptual server-and-cache scene, not a GitHub screenshot or an API test result.
On this page
  1. Stored response handling
  2. GitHub rate-limit boundaries
  3. Next implementation check

Stored response handling

This table is an editorial handling method, not an official GitHub recovery procedure.

Saved stateRequest validatorResponseHandling decision
Body and ETagSaved ETag in If-None-Match200Replace body; save returned ETag if supplied.
Body and ETagSaved ETag in If-None-Match304Reuse saved body.
ETag without bodySaved ETag in If-None-Match304Flag incomplete storage: nothing to reuse.

Hypothetical saved ETag trace

Save body A and ETag "demo-a". Send If-None-Match: "demo-a". A hypothetical 304 retains A; a later hypothetical 200 with body B and ETag "demo-b" replaces both. These labels and outcomes are invented, not test results.

GitHub rate-limit boundaries

GitHub’s primary-rate-limit exemption requires both a returned 304 and correct authentication through an Authorization header. Do not extend that exemption to every request or every limit. GitHub also recommends webhooks over polling; when polling is necessary, honor any x-poll-interval header before polling that endpoint again. See GitHub REST API best practices.

Next implementation check

Review the stored body and validator together. Record endpoint-specific unknowns separately from observed behavior. Check replacement, reuse and missing-body handling without describing an unperformed test as successful. Validation also does not prove that later application work used current data.

Source check: supplied GitHub Docs and MDN captures dated 2026-10-25 UTC; no live API test. Refresh the evidence when documentation changes or its validity window expires. The excerpts do not establish behavior for your particular endpoint.

Part of the API Security Review Hub: eight practical guides for reviewing AI automations that call APIs.

Comments

No comments yet. Why don’t you start the discussion?

    Leave a Reply

    Your email address will not be published. Required fields are marked *