If a servlet generates dynamic content and you want to ensure it's not cached, which combination of response headers should be set?

  • Cache-Control: no-store, Pragma: no-cache
  • ETag, Cache-Control: no-cache
  • Expires: 0, Cache-Control: must-revalidate
  • Last-Modified, Cache-Control: private
To ensure dynamic content is not cached, the combination of Cache-Control: no-store and Pragma: no-cache headers should be set in the HttpServletResponse.
Add your answer
Loading...

Leave a comment

Your email address will not be published. Required fields are marked *