• Resolved snippet24

    (@snippet24)


    So I wonder, if I set HTML to be cached by Cloudflare and say a device that supports avif loads the page, but then a device of similar screen size but that doesn’t support avif, will the second load the same cached avif version?

Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Author Pijush Gupta

    (@pijush_gupta)

    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.

    Thread Starter snippet24

    (@snippet24)

    I understand, thank you so much for explaining ??

    Maybe just use a bypass cache flag for images?

    • This reply was modified 7 months, 2 weeks ago by snippet24.
    • This reply was modified 7 months, 2 weeks ago by snippet24.
    Plugin Author Pijush Gupta

    (@pijush_gupta)

    Yes, you can bypass image caching, using page rules or workers script .

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘How does it behave with cache CDN?’ is closed to new replies.