In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-02-24 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >
Share
Shulou(Shulou.com)06/02 Report--
This article mainly talks about "what are the differences between post and get in ajax". Interested friends may wish to have a look. The method introduced in this paper is simple, fast and practical. Next, let the editor take you to learn "what are the differences between post and get in ajax?"
Differences: 1, get is to obtain data from the server, post is to transmit data to the server; 2, get method uses "Request.QueryString" to obtain data, post mode uses "Request.Form" to obtain data; 3, get security is very low, post security is high.
The operating environment of this tutorial: windows7 system, jquery1.10.2 version, Dell G3 computer.
The difference between post request and get request in Ajax
First, different functions
1. Get obtains data from the server.
2. Post transmits data to the server.
Second, the process is different
1. Get adds the parameter data queue to the URL referred to in the ACTION attribute of the submission form, and the value corresponds to each field in the form, which can be seen in URL.
2. Post is through the HTTP post mechanism, each field in the form and its contents are placed in the HTML HEADER and transferred to the URL address referred to by the ACTION attribute. The process is not visible to the user.
Third, get different values
1. For get mode, the server uses Request.QueryString to get the value of the variable.
2. For post mode, the server uses Request.Form to obtain the submitted data.
Fourth, the amount of data transmitted is different
1. The amount of data transmitted by get is small and cannot be larger than 2KB.
2. Post transmits a large amount of data, which is generally unlimited by default. But in theory, the maximum amount of IIS4 is 80KB and 100KB in IIS5.
Fifth, the security is different
1. Get security is very low.
2. Post has high security.
If there is no encryption, their security level is the same, any listener can listen to all the data.
Get and post are two common methods of request-response on the client side and server side in ajax, so what's the difference between get and post requests? This article will introduce you about the difference between post request and get request in ajax. Friends who need to follow the blogger, collect articles for next reference.
Finally, let's take a look at how post requests and get requests are used, respectively.
The post method is used when any of the following conditions are met:
1. The result of the request has persistent side effects, such as adding new data rows to the database.
2. If you use the GET method, the data collected on the form may make the URL too long.
3. The data to be transmitted is not encoded by 7-bit ASCII.
The get method is used when any of the following conditions are met:
1. The request is to find resources, and the HTML form data is only used to help with the search.
2. The result of the request has no persistent side effects.
3. The total length of the collected data and the input field name in the HTML form does not exceed 1024 characters.
At this point, I believe you have a deeper understanding of "what are the differences between post and get in ajax?" you might as well do it in practice. Here is the website, more related content can enter the relevant channels to inquire, follow us, continue to learn!
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.