Variant object

Variant objects in the context of HTTP are objects served by an Origin Content Server in a type of transmitted data variation (i.e. uncompressed, compressed, different languages, etc.).

HTTP/1.1 (1997–1999){{cite IETF

| title = Hypertext Transfer Protocol -- HTTP/1.1

| rfc = 2068

| last1 = Fielding

| first1 = Roy T.

| author-link1 = Roy Fielding

| last2 = Gettys

| first2 = Jim

| author-link2 = Jim Gettys

| last3 = Mogul

| first3 = Jeffrey C.

| last4 = Nielsen

| first4 = Henrik Frystyk

| author-link4 = Henrik Frystyk Nielsen

| last5 = Berners-Lee

| first5 = Tim

| author-link5 = Tim Berners-Lee

|date=January 1997

| publisher = IETF

| access-date = 2009-10-24

}}{{cite IETF

| title = Hypertext Transfer Protocol -- HTTP/1.1

| rfc = 2616

| last1 = Fielding

| first1 = Roy T.

| author-link1 = Roy Fielding

| last2 = Gettys

| first2 = James

| author-link2 = Jim Gettys

| last3 = Mogul

| first3 = Jeffrey C.

| last4 = Nielsen

| first4 = Henrik Frystyk

| author-link4 = Henrik Frystyk Nielsen

| last5 = Masinter

| first5 = Larry

| last6 = Leach

| first6 = Paul J.

| last7 = Berners-Lee

| first7 = Tim

| author-link7 = Tim Berners-Lee

|date=June 1999

| publisher = IETF

| access-date = 2009-10-24

}} introduces Content/Accept headers. These are used in HTTP requests and responses to state which variant the data is presented in.{{Citation needed|date=December 2022}}

Example Scenario

Client:

GET /encoded_data.html HTTP/1.1

Host: www.example.com

Accept-Encoding: gzip

Server:

HTTP/1.1 200 OK

Server: http-example-server

Content-Length: 23

Content-Encoding: gzip

<23 bytes of gzip compressed data>

See also

References

{{reflist}}