How to enable Etag management #2765
Replies: 2 comments
-
Cloudflare workers is not behind the Cloudflare edge. Cloudflare workers creates dynamic responses per request, therefore, it cannot be behind a Cloudflare edge. (You can have a Cloudflare worker sitting in front of a R2 which can generate an etag but Oxygen doesn't have R2 enabled) You can turn on full page caching using Oxygen https://shopify.dev/docs/storefronts/headless/hydrogen/caching/full-page-cache You can have etag management with a Remix app: https://sergiodxa.com/tutorials/use-etags-in-remix Keep in mind that you should only cache static contents (no personalized data, including cart) |
Beta Was this translation helpful? Give feedback.
-
already tried this one |
Beta Was this translation helpful? Give feedback.
-
Hello
I can see that there is a cache API avail on the cloudflare edge and that can be used to crete the Etag hash per page to avoid the client downloads again the same page if it hasn't changed.
There aren't examples, could you please provide a quick one? that will help others looking to activate etag.
https://shopify.dev/docs/storefronts/headless/hydrogen/deployments/oxygen-runtime
Beta Was this translation helpful? Give feedback.
All reactions