Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

AJAX security: POST or GET?

Tags:

ajax

post

get

As the title may possibly suggest, I'm wondering what's more secure for AJAX requests: POST or GET. I can't work out which is better because they're both hidden from the user due to the URI being sent via. AJAX, not in the URL bar.

Thanks,

James

like image 283
Bojangles Avatar asked Dec 28 '22 04:12

Bojangles


1 Answers

Neither add any security against either man-in-the-middle attacks or the end user. Both can be intercepted and tampered with using Wireshark, Firebug, or other tools.

If you want security against interception, you can use HTTPS. That does not prevent the user from sending requests manually, though.

like image 193
Matthew Flaschen Avatar answered Jan 08 '23 18:01

Matthew Flaschen