Via Header

Table of Content

The Via header is an HTTP response header that is applied by gateways, proxies, and other intermediary nodes and servers. The purpose of the Via header is to keep track of the hosts/networks that a particular request or response has passed through, essentially creating a route trace. This is especially useful in troubleshooting, allowing the administrators to identify any communication-related issues existing between two nodes easily.

Syntax

The syntax of the Via header is as follows:

Via: [protocol-name]/[protocol-version] [host] [comment]

Directives

Here are the key directives for the Via header:

  • protocol-name/protocol-version: These indicate the protocol used by the client, and its version.
  • host: This is the hostname or pseudonym of the machine that added this field to the header.
  • comment: Any comment or remarks related to the node adding the Via Header.

Examples

Below are example uses of the Via header:

Via: HTTP/1.1 veohost:8042 
Via: 1.0 fred, 1.1 example.com (Apache/1.1)

Browser Compatibility

Browser Compatibility
Chrome Not Supported
Firefox Not Supported
Safari Not Supported
Opera Not Supported
Edge Not Supported

Most browsers don't support Via header due to security reasons.

How to modify Via header

ModHeader is a Chrome extension that allows you to modify the HTTP request and response headers. You can use it to modify the Via header by following the steps below:

  1. Install the ModHeader extension on your Chrome browser from the Chrome web store.
  2. Click on the ModHeader icon on the extension toolbar.
  3. In the Response Headers section, click on Add.
  4. In the name field type Via, and in the value field, type the desired value (protocol/version and host).

It should be noted that most browsers don't support modifications to the Via header for security reasons. Its importance lies more in server-to-server communication, rather than the client-server relationship.