I know how HTTP methods work and for what they are designed, but I'm curious to know if some methods are faster than others when using just to get data.
In the team I'm working on I noticed a lot of JQuery ajax requests like this below:
$.ajax({url: "../dir/someFile.json", method: 'post', dataType: 'json',
error: function(...){ ... },
success: function(...){ ... }
});
I'd obviously use a 'get' method, as no data is sent to this request. This probably happened when a teammate was copying and pasting code. This works fine also, seems there's no good reason for changing it to 'get'.
I think using 'get' method would be faster in this case, but I didn't find any source affirming that.