The transfer of several GET parameters is performed at almost every request to the server. There should not be too many of these parameters to make it easier to control them from the browser and the server. Otherwise, the search engine will take different pages for duplicates.
What are GET parameters?
GET request is a method of transferring data from a client to a server in order to obtain information indicated by specific GET parameters.
This is public data, available when re-viewing links in history. Such a request is relevant to use when the data in the address bar is unchanged. That is, each time a page is accessed with the specified parameters, its address remains constant.
A GET request consists of a domain, a page address, and parameters that follow the “?” Sign. The format of one parameter looks like this:“key = explanation”. This view has the entire request:
where name is the first parameter and surname is the second parameter. The same request in PHP format:
echo ‘Name: ‘ . $_GET[‘name’] . ‘<br />’;
echo ‘Surname: ‘ . $_GET[‘surname’] . ‘<br />’;
where the if parameter defines a condition: if the name parameter exists, let it be displayed on the screen.
As a result, the browser will display the following information:
When transferring personal information there is no need to use GET request and parameters due to lack of confidentiality. Information from the address bar is open to users.
The use of such a request makes sense in case you need to save, send a link. To transfer sensitive information, it is better to use a POST request. Pages for which requests are transmitted by the GET parameter always have a static look.
How many GET parameters are considered correct
One request includes several GET parameters. Their number is not limited to the http protocol. There are limits on the size of the request from the server and the browser. Each of them has its own maximum size for receiving / transmitting data. If the length exceeds this limit, the request will be truncated.
There is no specific maximum GET request value. One server can receive a maximum of 8 KB, and the other – 16 KB. The average request size ranges from 512-1024 Kb.
In fact, in one such request there should be no more than 5 parameters, otherwise each of them will be difficult to control from the server and the browser. If you need to transfer a large amount of information, it is recommended to use the POST method.
When using human-readable URLs , the transfer of several GET parameters is performed in a hidden format. To see the request completely, you need to turn off the SEF for a while.
The number of GET parameters should not be too large so that there is no confusion in their definition by the browser and server. This method of transferring information is best used to create static pages without using secret data.
The http protocol does not limit the size of GET requests, but each browser and server has a data transfer limit. It is recommended to use an average of 512-1024 Kb or a maximum of 5 parameters to create one request.