0

So i have a jsTree and am adding this a_attr to the node, but i would like to hide the query paramters in the url (clientId,satisfactionClient...), as it writes the entire content on there. I just have no idea how, because this is how i get my data to render the page from the jsTree

   $aAttr = [
                         'href' => $this->router->generate('renderSuivi', [
                             'clientId' => $suivi->getCodeClient(),
                             'satisfactionClient' => $suivi->getSC(),
                             'nps' => $suivi->getNps(),
                             'compteRendu' => $suivi->getCR(),
                             'id' => $suivi->getId(),
                         ]),
             ];
$node = [
                'id' => $id,
                'text' => $text,
                'a_attr' => $aAttr,
                ];
  • What do you mean by "hide" the parameters? A URL is ultimately just a string, it doesn't have "hidden" parts any more than it has "greenish blue" parts. You can use a *posted" form rather than a URL to make the parameters less *obvious* to users, but remember that *everything you send to the browser is visible to the user if they know where to look* (e.g. by pressing F12 to bring up their browser's "developer tools"). – IMSoP Jun 02 '22 at 09:24
  • Does this answer your question? [GET vs. POST Best Practices](https://stackoverflow.com/questions/679013/get-vs-post-best-practices) – Besworks Jun 03 '22 at 20:52

0 Answers0