It took 2 days for the first time to compare the system to the next HTTP protocol, and now begin to do a collation.
Before finishing, there are some things I would like to say in the code word. First of all work, I changed my own company this year. For the company, I have been very grateful, especially my eldest brother, for I have given a lot of friends care and help, this leave and the boss chat time also have talked about, I said eldest brother I think I quite fail, the reason that failure is not to say that their incompetence, but that I was full of the boss over the deep feeling of living. Boss but also comfort me a lot, call me refueling. I remember when I first came in, our boss was very respectful of my opinion, for I won a lot of things I want to get. At the outset, we did not have a full-time technical predecessors to help us solve problems, and then specially arranged our company research and Development Department of a manager to do technical support. People originally to do management, after the special to take charge of the technology, that the original project those needs of what all have my eldest brother to get past, in order to be able to better standardize our rookie code and improve our technology. But in the end I left, this is the most I can see, as for the salary I think it is appropriate, so I did not ask too high or how to, including the current salary and the actual is similar. Because I do not want to become a know the reason why I do not know the reason, for the code a bit obsessive-compulsive, I always hope that the project can be better (these will not actually affect my development speed). I used to boast that I was a life-loving programmer, but in the end I chose to leave, so I was full of guilt for the boss. The eldest brother helped me to win a lot of many, including peacetime I can be very free, gave me the biggest play of space, gave me a more than peer colleagues of an optimistic salary, I always remember the boss told me before the words "I hope I grow up, he has been trying to put my good", including this has decided to leave after the job, Our boss also knew several big company's manager and so on, he also helped me inquire about my interview situation, gave me a pile of advice, is very good to me very good. In the new company this time, sentimental said I really have a little thought of my former boss, the world does not leave the feast, I know, I also refused to do a perceptual extremely indecisive person, for the eldest brother I will always think of him as a good boss of my life, here bless the eldest brother, hope that the eldest body health, the best luck.
Then it's learning. have been studying with a friend recently, originally? I don't have a lot of energy and ideas to sort things that I used to play, but I didn't want to wade through so much information, including videos, including PDF books, including the paper books in my hand, and then hit the code and put them into a blog post. But then I was very happy to do these things, and now the new company advocated the atmosphere is not to work overtime, this is also I give up a few big companies choose to come this side reason. I also have a lot of time to recharge now, so I will keep blogging habits, I hope I can be more technically. About learning, I always think is a gradual process, like the first college entrance examination, warm and know the new also has been a very important aspect of my. Take now j2e to say, I recommend my friend to start a review from the servlet, rather than directly into the framework. Although the direct learning framework is also possible, the direct tiger to use the framework Bai, is nothing more than those configured, agreed to what, but will simply use a framework or quickly can learn. But if this is the case, there are 2 obvious questions: 1, why use this thing that you are learning now? 2, if it is not possible to realize the function of this thing now, or there is no better way to achieve our function?
If you have not seriously studied servlet,jsp then you even what is the BS architecture do not know, what is the server programming, what is the client programming do not know, those cumbersome bottom is the simplest of the most primitive code you do not know, that for the use of the framework is certainly not a little bit of experience, In case of any problems encountered in the future, it is certainly not known, so it is important to have a serious order of study. I remember very well that I communicated the servlet to a friend a long time ago and then he asked why a servlet could run in Tomcat. I remember the answer was that Tomcat was a web container. At that time, I didn't know much about the Web container, but it would be useful, but it's not clear how he works, including the HTTP protocol, just knowing that the HTTP protocol is tantamount to a constraint that interacts with this constraint in requests and responses. The details of how the constraints are defined inside are not very clear. So before I studied the servlet, I started to compare the underlying research with Tomcat and HTTP and then began to study the servlet, so I thought it would be very effective to make all the things into an effective whole. Well, hope that in the future, I can not forget beginner's mind, many years later can become their own imagined appearance.
Now start the HTTP collation, altogether 3 articles, here is the HTTP overview.
OK, so now is the first question?
- What is the HTTP protocol?
HTTP Hypertext Transfer Protocol (Http-hypertext Transfer Protocol) is an object-oriented protocol belonging to the application layer, which is suitable for distributed hypermedia information System because of its simple and fast way. It was proposed in 1990, after several years of use and development, has been continuously improved and expanded. It is a detailed regulation of the browser and the World Wide Web server communication between the rules, through the Internet to transmit the World Wide Web document data Transfer Protocol. This emphasizes 2 words, rules. What is a rule, that is, a norm that binds everyone else, otherwise everyone follows his own rules, then there is no way to unify and interact.
- The evolution of the HTTP protocol
Hypertext Transfer Protocol is the predecessor of the Xanadu (Xanadu) project, super-text concept is Ted ˙ Nelson (Tednelson) in the 1960 's. After entering Harvard University, Nelson has been working on hypertext protocols and research on the project, but he has never published information publicly. In 1989, Tim Berners Lee ˙ Berners ˙ Lee
At CERN, the European nuclear Research Council = European Organization for nuclear study, a software consultant developed a set of procedures that laid the foundation of the World Wide Web (www. Wide Web). Ultra-text was first launched at CERN in December 1990. In the summer of 1991, the Hypertext Transfer Protocol became a part of many protocols in the Internet, following the protocols of Telnet.
At the time, the Telnet protocol addressed the requirement for one-to-two control communication between a computer and another computer. The Mail protocol resolves a communication requirement for a sender to send information to a small number of people. The file Transfer Protocol resolves a computer's ability to obtain a file in bulk from another computer, but it does not have the capability to show files on one side of the file or to perform some sort of file processing. The News Transfer Protocol addresses the communication requirements of a one-to-many news broadcast. The communication requirement for hypertext to be solved is to obtain and display text, data, pictures, and other types of files on a single computer that are stored on multiple computers; it contains two parts: Hypertext Transfer Protocol and Hyper-text Markup Language (HTML). The advent of HTTP, HTML, and browsers has brought a leap in the popularity of the Internet.
The main features of HTTP, remember a word is good: based on the request and the corresponding stateless connection.
1. Support client/server mode.
2. Simple and fast: When a customer requests a service from the server, it simply transmits the request method and path. The request method commonly has get, POST, HEAD and so on. Each method specifies a different type of contact between the customer and the server. Because the HTTP protocol is simple, the HTTP server's program size is small, so the communication speed is fast.
3. Flexible: HTTP allows the transfer of any type of data object. The type being transmitted is marked by Content-type.
4. No connection: No connection means that the connecting parties do not maintain a connection after the interaction is complete, and when the client sends a new request, the new connection is opened.
5. Stateless: The HTTP protocol is a stateless protocol. Stateless means that the protocol has no memory capacity for transactional processing.
A lack of state means that if the previous information is required for subsequent processing, it must be re-routed, which may cause the amount of data to be transferred per connection to increase. On the other hand, it responds faster when the server does not need the previous information.
- Session mode of the HTTP protocol
1 The process of communication between the browser and the server goes through four steps
2 The connection between the browser and the WEB server is transient, and each connection only processes one request and response. Access to each page, the browser and the WEB server to establish a separate connection.
3 All communication between the browser and the WEB server is completely separate from the request and response pairs.
- The difference between HTTP1.0 and HTTP1.1
Common HTTP protocols are now commonly used in 1.0 and 1.1 of these 2 kinds, there is also a http-ng is still in the experiment, this first regardless. In the following blog I will combine the Telnet window to illustrate the differences between the 2.
In the HTTP1.0 version, the browser requests a Web page with a picture, which opens a new connection to the server due to the download of the image, for example, I'm going to load an HTML page that imports a lot of CSS files or pictures, It's going to keep going. Connect to the server to get these resources this is very performance-intensive.
However, in the HTTP1.1 version, the browser is allowed to disconnect after receiving all the resources for the current request, which improves efficiency. Then there is a problem here is that, no matter how many times the request, the connection will eventually be disconnected, then when the disconnection? Here is a session time, after this session time the server did not receive the request again, it will naturally disconnect.
Well, here's an overview, and I'll take a look at the request header and the response header, as well as the use of the Telnet command, and finally, in conjunction with the browser F12, details how to monitor HTTP.
HTTP protocol Overview