ETag for assets

I have…

  • Read the following guideline: Troubleshooting and Support | Squidex. I understand that my support request might get deleted if I do not follow the guideline.
  • Used code blocks with ``` to format my code examples like JSON or logs properly.

I’m submitting a…

  • Regression (a behavior that stopped working in a new release)
  • Bug report
  • Performance issue
  • Documentation issue or request

Current behavior

response code 200, photo not from cache

Expected behavior

response code 304 Not Modified, photo from browser cache

Minimal reproduction of the problem

  1. Upload a photo to Squidex (e.g. .jpeg)
  2. Set the <img src="https://my-squidex-domain/api/assets/app-name/{id-asset}"> tag on your website.
  3. The first time you upload a photo, you’ll see "etag: 0" in the headers. Note that the 0 is not enclosed in quotation marks.
  4. Reopen the website. To validate the resource, the browser will send the If-None-Match: 0 header.

Environment

App Name:

  • Self hosted with docker
  • Self hosted with IIS
  • Self hosted with other version
  • Cloud version

Version: [7.20.0]

Browser:

  • Chrome (desktop)
  • Chrome (Android)
  • Chrome (iOS)
  • Firefox
  • Safari (desktop)
  • Safari (iOS)
  • IE
  • Edge

Others:
Possible reasons:

  1. The specification states that tag values ​​must be in quotation marks RFC 7232 - Hypertext Transfer Protocol (HTTP/1.1): Conditional Requests
  2. If here I save a tag like W/"0", caching will work. I understand that for resources, tags must be strong. This is just a demonstration.