HTTP

HTTP

Best Cache Practice

  • Use Gulp, Webpack, or similar to add unique hash digits to css, js, and image files (like app-67ce7f3483.css);
  • For js,css, and image files, set "Cache-Control: public, max-age=31536000", no Etag, no Last-Modified settings.
  • For html files and API response, use "Cache-Control: no-cache" and Etag.

Last update: 2020-01-02 09:13:59 UTC