Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

How to understand the interaction between browser and server in Ajax

2025-02-24 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >

Share

Shulou(Shulou.com)06/03 Report--

This article focuses on "how to understand the interaction between browser and server in Ajax". Interested friends may wish to have a look at it. The method introduced in this paper is simple, fast and practical. Let's let the editor take you to learn how to understand the interaction between the browser and the server in Ajax.

1. The browser sends a request to the server

two。 The server receives the request information and returns different information to the browser according to different circumstances.

3. The browser receives the information and outputs it to the current page

The above is a simple diagram of the interaction between the browser and the server. you can see that in the last step, the browser updates all the contents of this page after receiving the information, but in general, we only need to update some of the content. what are we going to do? So the server simply modifies the contents of this page and sends all the contents to the browser, so step 2, what the server sends to the browser is "how many stars are there in the sky?" I don't know. "I don't know." so much content, compared with the result after the browser updated the current page and the result before sending, there is only "I don't know".

Obviously, "how many stars are there in the sky?" These contents are repeated, is there a way to just send "I don't know"? So the smart programmer just. Then, stop, let's go back to the third step. After receiving the information, the browser will uninstall the current page and rewrite it, so ga. If you cancel the uninstall step, won't you change the rewrite operation to ok? So there is a hijacker between the browser and the server, who hijacks the information returned by the server, then cancels the uninstall operation of the browser, and modifies the current page, which is the basic principle of Ajax.

At this point, I believe you have a deeper understanding of "how to understand the interaction between browsers and servers in Ajax". You might as well do it in practice. Here is the website, more related content can enter the relevant channels to inquire, follow us, continue to learn!

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Development

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report