October 24, 2018

Browser Cache Expiration

  Caching, Zone Management

     

Browser Cache Expiration controls how long to tell browsers to cache static resources from your website.

For the purposes of this setting, a static resource is any resource with one of the following Content-Types or file extensions:

Content-Types
  • text/html
  • font/*
  • image/*
  • text/css
  • application/x-javascript
  • application/javascript
  • text/javascript
  • text/csv
  • application/msword
  • application/vnd.openxmlformats-officedocument.wordprocessingml.document
  • application/pls+xml
  • application/pdf
  • application/vnd.ms-powerpoint
  • application/vnd.openxmlformats-officedocument.presentationml.presentation
  • application/vnd.ms-excel
  • application/vnd.openxmlformats-officedocument.spreadsheetml.sheet
  • application/postscript
  • application/x-shockwave-flash
  • */x-midi
  • application/java
  • application/java-byte-code
  • application/x-java-class
  • application/java-archive
File Extensions
  • .css
  • .js
  • .ejs
  • .jpg
  • .jpeg
  • .gif
  • .ico
  • .png
  • .bmp
  • .pict
  • .tif
  • .tiff
  • .svg
  • .svgz
  • .webp
  • .csv
  • .doc
  • .pdf
  • .pls
  • .ppt
  • .docx
  • .xlsx
  • .xls
  • .pptx
  • .ps
  • .eps
  • .ttf
  • .eot
  • .woff
  • .woff2
  • .otf
  • .midi
  • .mid
  • .swf
  • .class
  • .jar

Equivalent Server Headers

If the resource is a static resource and the status code of the response from your server is 200 OK, this setting sets the following headers on the resource:

Cache-Control: public, max-age=SETTING_TTL_IN_SECONDS
Expires: CURRENT_DATE+SETTING_TTL_IN_SECONDS

Otherwise the following headers are set to tell browsers not to cache the resource:

Cache-Control: max-age=0, must-revalidate
Expires: -1

If these headers are not appropriate for your use case or want to cache (or not cache) additional content types or status codes, you can set this option to Respect Existing Headers, and then configure your server to set the appropriate cache headers.