HTTP - Response

About

An HTTP response is a message sent from a server to a client in response to a request.

It's the second part of a fetch, the first being a request.

Example

Example of a response that returns an HTML document

HTTP/1.1 200 OK
Date: Sun, 14 Feb 2021 13:39:15 GMT
Content-Type: text/html; charset=utf-8
Connection: keep-alive
Expires: Thu, 19 Nov 1981 08:52:00 GMT
Cache-Control: no-store, no-cache, must-revalidate
Pragma: no-cache
Set-Cookie: Session=Z2VyYXJkbm; path=/; secure; HttpOnly
X-UA-Compatible: IE=edge,chrome=1
Server: datacadamia.com
Content-Length: 66697


<!DOCTYPE html >
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en" dir="ltr" style="font-size:">
<head>
<meta name="generator
...
</html>

Format

The response message has:

Headers

Most known Response header

Content Type

CSP

Cors

cors headers

Creation

A response is produced by an handler





Discover More
Card Puncher Data Processing
Apache - HTTP Header (mod_header module)

mod_header is a apache module that permits to set HTTP header. If you add the below code snippet in your htaccess file, you will set the following response header the cache-control header and...
Cors Flowchart
Browser - Cross Origin Resource Sharing (CORS)

Cross-origin resource sharing (CORS) is a mechanism that: * allows a HTTP server * to control the cross-origin requests executed by a browser. In short, a HTTP server may allow or not to receive...
Browser
Browser - Cross-Origin Read Blocking (CORB)

Cross-Origin Read Blocking (CORB) is a security feature that prevents the contents of a resource from ever entering the memory of the renderer process memory based on its MIME type. The main motivation...
Firefox Browser Cache
Browser Cache - Management and usage

How to clear and manage the browser cache.
Cookie Scope Name
Cookie - Scope

The scope of a cookie name is a calculated property defined by the concatenation of the and attributes. If the request URL matches the scope (ie domain and path expression), the user agent (browser)...
Etag - An unique identifier for a HTTP resource

The ETag HTTP response header is an identifier for a specific version of a resource. A etag comparison determines whether two representations of a resource are the same and is therefore similar to a hash...
Expires HTTP header to control the response cache

Expires defines a date time that indicates when a response is stale for the response cache
HTTP - Message (Syntax)

An http message is a textual message that consists of: a header section and an optional entity (ie body). There are two kinds of messages: requests from client to server and responses from...
HTTP - Accept header

accept is a request header that specify the mimes type of the response body that are accepted by the client (ie browser) If no Accept header field is present, then it is assumed that the client accepts...
HTTP - Body (Content, Entity, payload, data sent)

Entities are the data sent with an HTTP message: HTML page Image Web form parameters An entity is better known as the body or in a network context, this is the payload of the message. The...



Share this page:
Follow us:
Task Runner