简体   繁体   中英

HTTP response headers over clients

So I am little confused on the behaviour of HTTP headers. My question is:

If I am running an API off a server. If a client makes a request, and i respond to the client via the server by setting a header in the form of:

response.header.<some_header> = <some_value>

will this header persist for all clients (ie some computer, and then another computer, etc), or is this header response unique to the client making the request?

Thanks!!

The response object is only sent to the client that made a request in the first place. In fact you said the answer in your question yourself:

"If a client makes a request, and I respond to the client via the server"

In general if a client made a request, the server can only respond the the client that made the request. Hope this answers your question. For more information on http headers you should read this .

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM