The difference between get and post

Seeing that the friends here have already been exposed to JavaScript

Then next is our theme: What is the difference between get and post in JavaScript

The common difference between get and post

The two most common methods of http protocol get and post;

Request cache : get will be cached, but post will not;

Bookmark bookmarks : get can, but post can not;

Keep browser history : get can, but post cannot;

Use : get used to retrieve data, post for submitting transactions;

Security : post is safer than get, and all post operations are invisible to users;

Request parameters : querystring is a part of url, get and post can be taken. get's
querystring (only supports urlencode encoding), post parameters are placed in the body;

Request parameter length limit : get request length is up to 1024kb, post has no limit on request data;

The difference between get and post

  1. Get is not secure. During the transmission process, the data is placed in the requested URL;

  2. The amount of data transferred by get is small and cannot be greater than 2KB, mainly because of the limitation of the length of the URL; the amount of data transferred by post is considered to be unlimited, but in theory, the maximum amount in IIS4 is 80KB and in IIS5 is 100KB.

  3. Get limits the value of the data set of the Form form to ASCII characters; Post supports the entire ISO10646 character set.

  4. The execution efficiency of get is better than the Post method. Get is the default method for form submission.

  5. Get is to get data from the server, and post is to transfer data to the server.

  6. The bottom layer of HTTP is TCP / IP, and the bottom layer of GET and POST is also TCP / IP. GET and POST can do the same thing. You need to add request body to GET and bring url parameter to POST, which is completely technically feasible.

Published 5 original articles · Likes0 · Visits200

Guess you like

Origin blog.csdn.net/Dream_Fever/article/details/103296171