views:

165

answers:

4

What is the Server HTTP response header useful for? I have yet to actually see a use for it. Why would someone that's requesting a webpage need to know what server a webpage is hosted on?

+1  A: 

Interesting question. At one level, perhaps it was originally seen as a capability device, similar to the user-agent on the request (browscap etc). In reality, neither is really useful in this respect, and most code now uses other means to test for options. And in many ways the server is (indirectly) in control of the requests from well-behaved clients (if has an influencing factor, at least).

These days, it is sometimes seen as a security issue, and I know many places that block this header on html traffic. But for non-html (but still http) traffic (such as web-services) it may still serve a useful versioning purpose (although you often see a product-specific versioning header in such cases).

Marc Gravell
+4  A: 

Server doesn't mean the server that the resource is served from. It's for advertising the implementation. As to its utility, that's a good question. Apache httpd can be configured not to include that header, since it can be considered a security issue.

jabley
+1  A: 

This has reminded me of the first HTTP server I wrote, which (obviously) returned the server header: Why do you want to know?

One possible answer to this question is "Because I'm doing a survey." For example, this would be impossible without the Server header.

Daniel Earwicker
Thanks hadn't thought of that.
Jason Baker
Hilariously, this got downvoted today, no explanation!
Daniel Earwicker
A: 

Stats.. and whoever it was will give you idea when and how things are spreading..

Try the dons Google and see the 3 letter Server: response.. Plenty of those around since they purchased plenty of boxes years and years back.

[ It's like claiming that Apache or IIS was spreading too fast, right on my MP's expenses .. ]

rama-jka toti