The issue
After following the official docs to allow server Etags:
https://support.cloudflare.com/hc/en-us/articles/218505467-Does-CloudFlare-support-ETag-headers-
I found that the HTML responses Etags are randomly removed for some users and kept for other users. For instance, for me are kept on Firefox, Edge, and a private Chrome window, but not on a regular Chrome window (even after deleting cache and cookies). Meanwhile for other users are always kept.
The use case for etags
My application loads different static web apps(with different index.html weak Etags) under the same URL, NGINX maps this. When the ETag is missing the browser will get a 304 response even when NGINX is pointing to a different application, this makes the user load the wrong application.
My “temporal” solution
After following this answer
I have disabled Security and Performance for the HTML paths and it seems like the Etag will not be removed anymore.
My questions
Is this maybe because some feature like Rocket Loader is changing the HTML making the Etag invalid and because of that removing the header?
I would like to know if there is a better way to solve this without disabling all the security and performance features.
Thank you!