current position:Home>Ajax foundation - HTTP foundation of interview essential knowledge

Ajax foundation - HTTP foundation of interview essential knowledge

2021-08-29 05:50:34 Big M

Dear friends , How do you do , I haven't updated the article for a long time , Today I'll introduce you to a technology , It's called ajax(Asynchronous Javascript And XML), It is a web development technology for creating interactive web applications .

Popular point theory , You don't have to refresh the page , Submit data to the server through the client , So as to update a part of the web page .(ps: Traditional web pages ( Don't use AJAX) If you need to update the content , You have to reload the entire page )

Look at the picture :

Now more and more companies support the separation of front and back-end development , So as a front-end Developer , It is no longer simply limited to making a cutaway , therefore , As a qualified front-end Engineer , Of course, we should master this technology .

Don't talk nonsense , Next, let's learn this technique of holding and holding .

Before learning , You may need to have a little server-side level , What I use here is php. Of course , If you don't understand php It doesn't matter , Only some very simple code is involved here , I won't learn from you ajax Understanding creates stress .

Study ajax Before , We need to know about http Some knowledge of . That's true. , Many beginners are unfamiliar with this knowledge point , But this is a necessary knowledge for many companies to interview . Now follow me , Be familiar with the following knowledge points , You can open about http The gate of knowledge .

First ,http It's the rule that computers communicate over the network , Is a stateless protocol ( It means that after the client sends the request , The server received it , The request was disconnected , Not saved )

The above is a complete http The process of requesting and responding , Next, let's take a look at these two parts .

Have a look first http Request part :

(ps: There are many ways to request , But the general use is get and post request )

Look at the examples , Here is one get request , At the top is the way of request , Address, etc , Then the red part is the request header information , Finally, the request body

Now let's see http The response part of :

Look at the examples :

(ps: This example has no response body )

Then let's look at http The status code of the response , It helps us debug the efficiency and accuracy of the program .

thus ,http There is only so much basic knowledge of , Isn't it rare .

Little knowledge , But keep this in mind , After all, people who will be called engineers in the future , Not too much low( since high in ...)

I just want to comb some beginners http Just the basics of , Want to know more about , You can read that 《 The illustration HTTP》, Easy to understand ( But I haven't finished reading it completely )

----------- A less gorgeous dividing line ----------

Last , I think about it recently , I think it is necessary to build a front-end communication group , You can discuss and exchange front-end technology in it , Share experiences, etc , Jointly improve our front-end development level .

This article is from WeChat official account. - javascript Instance analysis (jsexample) , author : Kobayashi

The source and reprint of the original text are detailed in the text , If there is any infringement , Please contact the [email protected] Delete .

Original publication time : 2016-11-08

Participation of this paper Tencent cloud media sharing plan , You are welcome to join us , share .

copyright notice
author[Big M],Please bring the original link to reprint, thank you.
https://en.qdmana.com/2021/08/20210829055031895Q.html

Random recommended