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.
Loading...
Related Quiz
- What is the impact on performance when using PreparedStatement for repeated database operations?
- A developer needs to insert multiple rows into a database efficiently. Which statement type and technique should they use?
- What is the benefit of implementing the SingleThreadModel interface in servlets?
- What is the primary purpose of the POST method in HTTP?
- How can a servlet differentiate between client errors (like 404) and server errors (like 500)?