0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 3 years have passed since last update.

Cloudflare キャッシュのデフォルト挙動確認

Last updated at Posted at 2021-07-08

参考:デフォルト挙動

よくあるのがデフォルトで .html はキャッシュされない点に注意。
また、image/png のような MIME タイプには関係なく、あくまで URL の拡張子ベースでキャッシュするかどうかを判断している点に注意。

Understand file extensions cached by default – Cloudflare Help Center
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:
image-20210708171521580

拡張子がある画像 URL

https://*.company/png/*.png という拡張子を含む画像 URL は、デフォルトでキャッシュされる。

image-20210708172605660

拡張子がない画像 URL

https://*.company/foo/bar/ というように画像ファイルが表示させる URL であっても、*.png というように末尾に拡張子がない場合は、たとえ Content-Type: image/png となっていてもデフォルトでキャッシュされない。(キャッシュさせたい場合は、個別に Cache Level = Cache Everything 等の Page Rule を設定する)

image-20210708172221358

参考

0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?