1. Device A (Supports AVIF):
• Request: Device A sends a request to your server via Cloudflare.
• Server Logic: Your server detects that Device A supports AVIF and serves the page with AVIF images.
• Cloudflare Caches: Cloudflare caches the HTML content, including the AVIF images, based on the URL and other caching rules.
Subsequent Request:
2. Device B (Does Not Support AVIF):
• Request: Device B sends a request for the same URL.
• Cloudflare Cache: Cloudflare checks its cache and finds the previously cached HTML content from Device A’s request.
• Response: Cloudflare serves the cached HTML content to Device B, which includes the AVIF image.
Since Cloudflare served the cached HTML content without checking Device B’s AVIF support, Device B might receive the AVIF image that it cannot display.
I understand, thank you so much for explaining 🙂
Maybe just use a bypass cache flag for images?
-
This reply was modified 1 year, 8 months ago by
snippet24.
-
This reply was modified 1 year, 8 months ago by
snippet24.
Yes, you can bypass image caching, using page rules or workers script .