Strong etags were converted to weak etags

What is the name of the domain?

What is the issue you’re encountering

We have a service that is proxied by Cloudflare, since our assets does not change quite often so we send etag along with requests and expect to get response code 304. But most of the response are http 200, with some debugging the root cause is because etags were transfered to weak etags.

What steps have you taken to resolve the issue?

Following are our setup (according to the doc : Using ETag Headers with Cloudflare · Cloudflare Cache (CDN) docs) :

Client side mobile app: send Accept-Encoding ​gzip, br request header
Our origin server: adding compression: gzip in response
Cloudflare : enable “respect strong etag rule” to enable respect strong etag rules.

So with the setting above, I would expect Cloudflare Return GZIP-compressed response to visitor with strong ETag header: etag: “foobar” , dunno why this does not working as I expect.

I did confirm that etag are still in strong format while I hit the endpoint internally.

Any input would be appreciated.

Thanks!

Cloudflare can change the ETag value to a weaker value when Cloudflare needs to decompress the response from your origin server and compress it again to the client to modify the response. In general, the following products could change the ETag value to a weak value if enabled:

  • Email Address Obfuscation
  • Rocket Loader
  • Mirage
  • Automatic HTTPS Rewrites
  • Polish
1 Like