Skip to content

Conversation

@jamesthurley
Copy link
Contributor

@jamesthurley jamesthurley commented Mar 11, 2025

Resolves #83.

This commit adds ETag support when requesting the image_url returned by the /api/display call.

  • If an ETag was previously received it is added to the request headers.
  • If the server returns 304 Not Modified, it doesn't fetch the body or refresh the display.
  • If the server returns an ETag then it is saved to include in the next image_url request.
  • If the logo is displayed on the screen (due to refreshing via the back button) the ETag is cleared to ensure we draw the latest returned image.

If the server doesn't support ETags then the there are no significant changes in behaviour.

Tested on my device.

@jamesthurley jamesthurley marked this pull request as ready for review March 11, 2025 17:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Feature Request: ETag support

1 participant