Cloudflare only caches based on file extension and doesn’t cache by MIME type. The Cloudflare CDN automatically caches files containing certain file extensions and doesn’t cache HTML by default
and then lists some file extensions which i get. The documentation then moves on to describe the different types of CF-Cache-Status’. For CF-Cache-Status: DYNAMIC header, it states that
The resource content type was not cached by default and your current Cloudflare caching configuration doesn’t instruct Cloudflare to cache the resource. Instead, the resource was requested from the origin web server. Use Page Rules to implement custom caching options.
I read “resource content type” as MIME type which for me contradicts the first quote. Should the documentation for DYNAMIC be updated to state “file extension” instead of “resource content type”? Or am I missing something?
Caching is based on extension, not mime type. To implement a cache rule requires either cache everything on a path, in which case mime type is irrelephant or a specific pattern (e.g. /*.xyz ) in which case the file extension match determines whether or not the object is cached.
— OG