С помощью заголовков http происходит обмен service information between the client and the server. This information remains invisible to users, but without it, the correct operation of the browser is impossible. For ordinary users, information about this and about the tasks of the http headers will seem rather complicated, but in fact they do not contain difficult formulations. This is what the web user encounters daily.
«Протокол передачи гипертекста» – именно так http header is translated. Thanks to its existence, client-server communication is possible. If explained in simple terms, the browser user sends a request, initiating a connection to the server. The latter, by default, waits for a request from the client, processes it and sends back summary information or a response. In the search box, the user “drives in” the address of the site, which starts with http: // and gets the result in the form of the opened page.
When the site address is printed in the correspondingstring, the browser finds the required server using DNS. The server recognizes an http header (one or more) that the client sends to it, and then issues the required header. A set of mandatory consists of already existing headers and not found.
In general, http headers are quite effective.They are not visible in the HTML coding, they are sent before the requested information. Many headers are automatically sent by the server. In order to send it in PHP, you should use the function header.
The interaction scheme of the browser and the site is enoughsimple. So, the http header starts the query string, which is then sent to the server. In response, the necessary information comes to the client. By the way, the http protocol is already seventeen years old - the most used on the Internet. It is simple, reliable, fast and flexible. The main task of http is to request information from a web server. The client is a browser, and the server is ligthttp, apache, nginx. If the connection between them was successful, the server receives the necessary information in response to the request. The http information contains text, sound, video.
The protocol can be a transport for others. Customer request consists of three parts:
The start line is a required element of the request for the http header field. The structure of the user request consists of three main parts:
Modern browsers use version 1.1. The following are headings in the format "Name: Value".
The bottom line is that caching provides storageHTML pages, other files in the cache (place in the operating memory, on the hard disk of the computer). This is necessary in order to speed up access to them and save traffic.
The cache has a client browser, an intermediate gateway andproxy server. Before you send a message to the URL, the browser checks for an object in the cache. If there is no object, the request is transmitted to the next server, where the caching of http headers on the nginx server is checked. Gateways and proxies are used by different users, so the cache is shared.
HTTP caching is not only capable ofspeed up the site, but also provide the old version of the page. Using site caching, headers are sent to the response. However, the information requested via the HTTPS protocol cannot be cached.
Одними из самых главных механизмов кеша считаются http expires headers These headers report the expiration date provided in the response information. They indicate the time and date when the cache will be considered obsolete. For example, such a headline looks like this: Expires: Wen, 30 Nov 2016 13:45:00 GMT. This structure is used almost everywhere, including for caching pages and images. If the user selects the old date, the information will not be cached.
Http proxy headers are classified as headerlink. They are not cached by default. For the cache to work correctly, each URL must correspond to one content variant. If the page is bilingual, each version must have its own URL. The vary header tells the cache the headers of the request. For example, if the display of the request depends on the browser, the server also needs to send a header. Thus, different variants of requests and document types are saved in the cache. The TTP accept header is necessary in order to make lists of acceptable formats for the used resource, it is rather easy to work with it, as it eliminates unnecessary ones.
There are a total of four heading groups,which transmit service information. These are the main headers - they are contained in any message of the server and client, request and response, as well as entities. The latter describe the content of any message from the client and server.
HTTP authorization header is consideredextra. When a web page asks the client for authorization, the browser displays a special window with fields for entering login and password. After the user enters their data, the browser sends an http request. It contains the title "authorization".
To see the http header, you need to install browser plugins, for example, firefox:
When the plugins are installed, launch them and refresh the browser page.
Methods that are used in HTTP are similar to instructions that are sent as a message to the server. This is a special word in English.
Server responds to client requests with longmessages. The answer consists of several lines indicating the protocol version, server status code (200). He talks about what has changed on the server during the processing of the incoming request:
The URL is the heart of web communication between the client andserver. The request is usually sent via a URL - a single resource index. The url request structure is very simple. It consists of several elements: http protocol (header), hoot (website address), port, resourte path and query.
The protocol is also available for securehttps connections and information sharing. The URL contains information about the location of a particular site on the Internet. The address includes the domain name, the path to the page, as well as its name.
The main drawback of working with URLs is the inconvenient interaction with the Latin alphabet, as well as numbers and symbols. In SEO optimization, the url address plays a significant role.
Active computer users and developers should not get acquainted with some professional recommendations that experts in this field give: