httpbrowser-cachehttpserveridempotenthttpbrowsercapabilities

Who is responsible for implementing the properties of the HTTP methods? Is it browser or HTTP Server or both?


As we all aware the HTTP method has certain properties like, idempotent, safe and cache-able and its defined through HTTP specification by W3C.

My question is who is responsible to implement these HTTP properties. Is browser client, or the server, or both the browser and server which implement the properties of HTTP.


Solution

  • The client asks for something. The server responds with something.

    For it to be idempotent, you should expect to get the same response if you ask for the same thing. Only the server can decide what is in the response, so that has to be implemented by the server.

    For it to be safe, the request must not alter the server. Only the server can decide to alter something or not based on the request.

    Caching takes place on the client (it decides if it should make a request or not based on what data it already has). Only the client can make that decision. (Of course, the server is responsible for giving the client the information they need to make that decision).