-
-
Notifications
You must be signed in to change notification settings - Fork 3.3k
[js] 第70天 Ajax请求中get和post方式有什么区别呢?分别在哪些场景下使用? #500
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
顾名思义 还有delete等 |
get:
post:
|
get 用于资源可被缓存的请求 用于查 |
|
Get请求会将数据放在url后,用于提交非敏感数据和小数据,对信息量有限制,请求的参数只能是ASCII码,会被浏览器主动缓存、后退不会有影响、记录会留在历史记录中 Post请求会将数据放在请求主体中,用于提交敏感数据和大数据,对信息量没有限制,请求传参没有这个限制,不会被浏览器主动被缓存、后退会重新进行提交、不会留在历史记录 |
GET请求一般是用于获取数据,参数会被拼接到url后面,有数据大小限制,且该数据可以被浏览器缓存。 |
第70天 Ajax请求中get和post方式有什么区别呢?分别在哪些场景下使用?
The text was updated successfully, but these errors were encountered: