What is ETag?

The ETag (Entity Tag) header is used to uniquely identify the version of a file. It allows web browsers and CDNs to determine whether a cached version of a file is still valid. If a file changes, the ETag changes as well, making it a powerful tool for efficient caching and reducing bandwidth usage.

How Bunny.net Handles ETag Headers

Yes, Bunny.net does support the ETag header, with a few important considerations:

  • If your origin server includes an ETag header in its response and the “Optimize for Video Delivery” option is disabled, Bunny.net will pass through the ETag and cache the resource accordingly.
  • If Bunny.net applies compression to the file (such as Brotli or Gzip), the ETag will be converted into a “weak” ETag. In this case, you’ll see a W/ prefix in front of the ETag string.

For example:

ETag: "123456789"

ETag: W/"123456789"

This ensures compatibility with HTTP caching mechanisms while acknowledging that compression may slightly alter the binary output of the file.

Table of Contents

Was this article helpful?
2 out of 2 found this helpful