0

I have a javascript snippet that sends a POST request, but the backend no longer serves that request. Would removing that code significantly improve the website performance? The problem is that the ajax code is run on every single page. I am thinking yes, but I am not sure, because unlike a SQL request it doesn't really consume any CPU power.

2
  • 1
    have you tried doing it? This is the kind of thing you should do even if it has no impact on server performance
    – Tom J Nowell
    Feb 16, 2022 at 0:51
  • 400 is bad request, please check the response from the server. Maybe it was blocked by security (eg: waf or .htaccess), and or maybe by the codes. Feb 16, 2022 at 1:27

1 Answer 1

0

This depends on a lot of factors. The short answer, yes you should remove it as request still needs to be served and this might become problematic at scale. Besides you are slowing down your server without need, and could even block some other request depending on how this was coded.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.