What is the difference between post and get requests in Ajax?

Source: Internet
Author: User

Tag: request POS uses STR to restrict ORM ring acceptance name

The difference between post and get requests in Ajax:

1.Post when transferring data, you do not need to display it in the URL, and the Get method is displayed in the URL.
The 2.Post transmits a large amount of data, which can reach 2 m, while the Get method can only pass approximately 1024 bytes due to URL length limitations.
3.Post as the name implies, is to transfer data to the server segment, get is to get data from the server segment. And get can also transmit data, just to design tell the server, you need what kind of data. The post information is the content of the HTTP request, and get is transmitted over the HTTP header.
Get method is received with request.querystring["StrName"]
The Post method is received with request.form["StrName"]
Attention:
Although the two submissions can be unified with request ("StrName") to obtain the submission data, but this has an impact on the efficiency of the program, is not recommended to use.
In general, try to avoid submitting forms using get, as they can cause security issues

Summarize:

Difference (simple note):

1. A parameter is displayed in the URL, and a parameter is not displayed in the URL;

2. A security, an unsafe;

3. Size limit post is larger than get;

4. The way to accept the parameters is different;

What is the difference between post and get requests in Ajax?

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.