Is there any disadvantage in using POST to retrieve data instead of GET in jQuery Ajax requests?

g_b

Is there harm ind doing so? Sometimes, I want to retrieve data parameters are too long and I don't want it to show in my URL so I use POST. Should I not be doing this? If so, for the case that I mentioned, how would you go about the long query string?

Jacob

The inability for caching to take place is one disadvantage. Another is that it may violate the principle of least surprise; people expect GET for getting data usually.

To avoid a long query string, one approach is to consider whether it makes sense to integrate your parameters into your path instead of query string parameters.

Collected from the Internet

Please contact [email protected] to delete if infringement.

edited at
0

Comments

0 comments
Login to comment

Related

POST request to PHP does not retrieve any data when using a form instead of angular http client

Retrieve array data on POST using PHP Ajax

How to get "data" from JQuery Ajax requests

How to send Javascript/jQuery AJAX POST requests sequentially, looping over an array of request data, using Promises?

jquery - Send JSON data via POST (ajax) and retrieve in php

Is there any disadvantage in using PYTHONDONTWRITEBYTECODE in Docker?

Unable to retrieve json data using jQuery get

Best Practices in Razor Pages: Using AJAX or Handlers for post/get requests

AJAX POST not sending data instead it sends via GET method

Using POST instead of GET

Changing ajax POST data for a second request using .done() instead of success

Ajax sends get instead post

AJAX sending a GET instead of a POST

Ajax sending Get instead Post

How to retrieve data from JSON file using Jquery and ajax?

Cannot retrieve data from Yelp API using jQuery.ajax()

post and get data using jquery ajax and update html table row only in mvc

Retrieve data from google spreadsheets using ajax get

React using JQuery post+get data

Abort Ajax requests using jQuery

Is there any disadvantage of using Map over Object in Javascript?

Is there any disadvantage of executing a shell script using nohup?

Any disadvantage of using IIR filters for image processing?

How to get api data using jquery ajax?

retrieve data using Ajax and mysql

Using ajax to retrieve a data grid

Using fetch instead of jQuery's ajax for a GET API call

jQuery ajax get request to php not retrieving any data

Global event handler for AJAX POST requests in jQuery