Câu hỏi phỏng vấn API Design
Câu hỏi

Which header of HTTP response ...

Câu trả lời

The header of an HTTP response that provides control over caching is the Cache-Control header. This header is crucial for specifying caching policies for both browsers and intermediate caches such as CDNs. It allows the server to define how and for how long individual responses are cached, thereby improving application performance by reducing server load and enhancing user experience through faster load times.

The Cache-Control header can include various directives, such as:

  • max-age: Specifies the maximum amount of time a resource is considered fresh.
  • public: Indicates that the response can be cached by any cache.
  • private: Indicates that the response is intended for a single user and should not be cached by shared caches.
  • no-cache: Forces caches to submit the request to the origin server for validation before releasing a cached copy.
  • no-store: Instructs caches not to store any part of the request or response.

For example, a Cache-Control ...

senior

senior

Gợi ý câu hỏi phỏng vấn

middle

WebSockets vs Rest API for real time data? Which to choose?

expert

What are the best practices to be followed while designing a secure RESTful web service?

middle

What are the disadvantages of statelessness in RESTful Webservices?

Bình luận

Chưa có bình luận nào

Chưa có bình luận nào