Skip to content
Related Articles

Related Articles

Improve Article
HTTP headers | Alt-Svc
  • Last Updated : 10 May, 2020

The HTTP headers Alt-Svc header is a response-type header it has been used to advertise alternative service. Which services can be defined by a protocol/host/port combination.

Syntax:

Alt-Svc: clear
Alt-Svc: <protocol-id>=<alt-authority>; ma=<max-age>; persist=1

Directives: This header accept five directives as mentioned above and described below:

  • clear: This directive define that all alternative services for that origin to be invalidated.
  • <protocol-id>: This directive is the ALPN protocol identifier.
  • <alt-authority>: This directive defines an alternative authority which consists of an optional host override, a colon, and a mandatory port number.
  • ma=<max-age>: It holds the number that defines seconds for which the alternative service is considered fresh if it is omitted then the default value will be 86400. It is an optional directive.
  • persist=1: This directive holds the alternative service which cleared on network configuration changes. Use of the persist=1 ensures that the entry is not deleted through such changes.

Example:

  • Alt-Svc: h2=":425"; ma=2585900; persist=1
  • Alt-Svc: h2=":485"; ma=592000; 
    

To check this Alt-Svc in action go to Inspect Element -> Network check the request header for Alt-Svc like below, Alt-Svc is highlighted you can see.

Supported Browsers: The browsers compatible with HTTP headers Alt-Svc are listed below:

  • Google Chrome
  • Internet Explorer
  • Firefox
  • Safari
  • Opera
My Personal Notes arrow_drop_up
Recommended Articles
Page :