Answer the question
In order to leave comments, you need to log in
How bad is the idea of storing all query parameters for a page in a cookie?
The backend programmer is very fond extract($_POST);
of code and insists that without exception, all GET requests to the page
/index.html?a=1&b=2&c=3must be stored in a cookie and then passed to the back. Are there any arguments against this?
Answer the question
In order to leave comments, you need to log in
the request
/index.html?a=1&b=2&c=3
is self-sufficient, this is code duplication and this is definitely bad.
And yes, in the post it is bad practice to pass parameters, let them go in the request body, although this is not a strict definition.
In post it is normal to send requests in REST notation
For example
/user/orders
and add filtering parameters in the request body.
Let the backender read what cookies are and what they are for, for example here: https://developer.mozilla.org/ru/docs/Web/HTTP/Cookies
Explain that hammering nails with a microscope is not a good idea, even if he is so used to it.
If it is not possible to act directly, then it is possible through a tech lead or team lead.
Are there any arguments against this?at least the fact that cookies are long-term storage, and not a means of communication between the client and the server
Backend programmer lovesextract($_POST);
as far as I remember php, get parameters are passed to $_GET
and do not affect in any way$_POST
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question