当前位置:网站首页>Detailed explanation of status code meaning
Detailed explanation of status code meaning
2022-07-27 10:49:00 【Golden% sunset】
Status code
1、 Definition
When users are browsing the web , The browser will return a htttp Status code , It is mainly used to respond to browser requests . Usually , It's usually 3 Digit number ,http The status code is from RFC 2616 To define the , The first number of all the status codes represents the status .
2、 Classification of status codes
1xx
This type of status code , The representative's request has been accepted , Need to continue processing . This kind of response is a temporary response , Contains only the status line and some optional response header information , And end with a blank line .
2xx
This type of status code , The delegate request has been successfully received by the server 、 understand 、 And accept .
3xx
This kind of status code represents that the client needs to take further actions to complete the request . Usually , These status codes are used to redirect , Subsequent request address ( Redirect to ) In this response location The domain indicates .
4xx
This type of status code represents what appears to be an error on the client side , Hinders server processing . Unless the response is a HEAD request , Otherwise, the server should return an entity that explains the current error condition , And whether it's temporary or permanent . These status codes apply to any request method . The browser should show the user any entity content contained in such an error response .
5xx
This kind of status code represents that the server has an error or abnormal status in the process of processing the request , It is also possible that the server realizes that it cannot complete the processing of the request with the current hardware and software resources . Unless it's a HEAD request , Otherwise, the server should contain an entity explaining the current error status and whether the status is temporary or permanent . The browser should show the user any entities included in the current response .
3、http What are the common status codes
200
HTTP 200 The status code indicates that the request was successful , And the request sent wants to return a response , If you are visiting the website or checking the website space log , notice 200 It means normal .
301
HTTP 301 The status code may not be very strange to the operation and maintenance personnel , Generally, when a website jumps , use 301, In general , Because the domain name expires , Or do not renew the domain name , Transfer resources to other websites ,301 Is a permanent redirection .
302
HTTP 302 Status code is HTTP A status code in the protocol (Status Code). It can be simply understood that the resource does exist , But it has been temporarily changed ; In other words , That is, the requested resources are temporarily resident in different URI Next , Therefore, unless a cache header indication is specified , The status code is not cacheable .
304
If the client sends a conditional GET Request and it has been allowed , And the content of the document ( Since last visit or as requested ) It hasn't changed , Then the server should return this 304 Status code . The simple expression is : The server has executed GET, But the file has not changed .
307
307 For temporary redirection , If redirection 307 The original request of is not get perhaps head Method , Then the browser will automatically redirect , Even if location Yes url, It should also be ignored .
Status code 307 And 302 The only difference between is , When sending a redirect request ,307 The status code ensures that the request method and message body will not change . When the response status code is 302 When , Some old user agents will incorrectly convert the request method to GET: Use non GET Request method and return 302 Status code ,Web The health of the application is unpredictable ; And back 307 The status code is predictable . about GET The request for , There is no difference between the two situations .
308
stay HTTP Agreement ,308 Permanent Redirect( Permanent redirection ) Is the response status code for redirection , Indicates that the requested resource has been permanently moved to by Location The first part specifies URL On . The browser will redirect , At the same time, the search engine will also update its links ( use SEO In Chinese jargon , intend “ Link juice ”(linkjuice) Passed to the new URL)
400
HTTP 400 The status code tells the client that it sent an exception request .400 A page is when a user opens a web page , Return to the user interface with 400 Prompt page . It means that the domain name of the page you visit does not exist or the request is wrong . There are two main types .
401
Request for authentication . For the web page requested after login , The server may return this response .
403
Server rejects request . If you are in Googlebot See this status code when trying to grab a valid page on your website ( You can go to Google Webmaster tool diagnosis under the network crawl page to see this information ), Maybe your server or host rejected Googlebot visit .
404 Status code
When users are visiting the website , There may be 404 page , appear 404 The reason for the page may be that the requested resource does not exist , The page may be deleted .
500
HTTP 500 Status code is also the most common status code , I believe many programmers have encountered ,500 Indicates that there is a problem with the server of the website , But different status codes represent different problems in the server .
501
The server does not have the function to complete the request . for example , This code may be returned when the server does not recognize the request method .
503
The server is currently unavailable ( Maintenance due to overload or shutdown ). Usually , It's just a temporary situation .
reference :https://www.liujason.com/old-blog/1406.html
边栏推荐
- 简单几步教您实现为工业树莓派共享网络
- Multipoint bidirectional republication and routing strategy
- [Linux] mariadb/mysql scheduled full backup script and data recovery
- Two architectures of ETL (ETL architecture and ELT Architecture)
- 【英雄哥六月集训】第 25天: 树状数组
- It is thought-provoking: is syntax really important? Qiu Xipeng group proposed a powerful baseline for aspect based emotional analysis
- Apache cannot start in phpstudy
- 已解决SyntaxError: (unicode error) ‘unicodeescape‘ codec can‘t decode bytes in position 2-3: truncated
- Data types and variables
- Metaaploit post penetration technology knowledge
猜你喜欢

FTP server

Mail server

阿里邮箱web端登录转圈的处理

MySQL log management, backup and recovery

Tensorflow notes - basic functions and concepts

Shardingproxy sub database and table actual combat and comparison of similar products

warning package. Json: no license field error

Codeforces Round #807 (Div 2.) AB

flask_restful中的输出域(Resource、fields、marshal、marshal_with)

免费 DIY 之旅问题
随机推荐
ECCV 2022 | 同时完成四项跟踪任务!Unicorn: 迈向目标跟踪的大统一
kgdb调试内核无法执行断点及kdb-22:Permisson denied
Oracle 11g manual memory management
OpenAtom OpenHarmony分论坛,今天14:00见!附大事记精彩发布
Beijing publicized the spot check of 8 batches of children's shoes, and qierte was listed as unqualified
The core concept and fast practice of shardingsphere
Want to speed up the vit model with one click? Try this open source tool!
Have you ever seen this kind of dynamic programming -- the stock problem of state machine dynamic programming (Part 1)
Loop traversal of foreach and some of ES6
Warning: remote head references to nonexistent ref, unable to checkout error messages
Metasploit Eternal Blue attack
让人深思:句法真的重要吗?邱锡鹏组提出一种基于Aspect的情感分析的强大基线...
Detailed analysis of graphs of echats diagram les miserables (chord diagram)
Custom page 01 of JSP custom tag
Your appearance is amazing! Two JSON visualization tools are recommended for use with swagger. It's really fragrant
【Liunx】MariaDB/MySQL定时全量备份脚本及数据恢复
Advanced operation of MySQL data table
让人深思:句法真的重要吗?邱锡鹏组提出一种基于Aspect的情感分析的强大基线...
多点双向重发布和路由策略
R语言管道符(%>%)及占位(.)的简单介绍