In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-18 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >
Share
Shulou(Shulou.com)06/02 Report--
This article introduces the relevant knowledge of "what are the shortcomings of ajax". In the operation of actual cases, many people will encounter such a dilemma. Then let the editor lead you to learn how to deal with these situations. I hope you can read it carefully and be able to achieve something!
The disadvantages of ajax are: 1, it may destroy the browser's function of backing back and adding bookmarks; 2, the interval between the user's request and the server's response becomes longer, and so on.
Operating environment of this article: Windows7 system, javascript1.8.5, DELL G3 computer
What are the disadvantages of ajax?
The main drawbacks of Ajax are:
It may damage the browser's ability to back up and add bookmarks. In the case of dynamically updating the page, the user cannot return to the previous page state because the browser can only record static pages in the history. The possible difference between a fully read page and a dynamically modified page is subtle; users usually want to click the back button to cancel their previous operation, but in Ajax applications, they cannot do so.
However, developers have come up with a variety of ways to solve this problem, and most of the previous methods of HTML5 were to create or use a hidden IFRAME to reproduce changes on the page when the user clicked the back button to access the history. (for example, when the user clicks back in Google Maps, it searches in a hidden IFRAME and then reflects the search results on the Ajax element to restore the application state to its current state).
With regard to the inability to add status to favorites or bookmarks, one of the previous ways for HTML5 was to use URL fragment identifiers (often referred to as anchors, that is, the part after # in URL) to keep track, allowing users to return to a specified application state. Many browsers allow JavaScript to update anchors dynamically, which enables Ajax applications to update anchors while updating the display. In the future, HTML5 can directly manipulate the browsing history and store the state of the web page as a string, which will be hidden when you add the web page to your favorites or bookmarks.
The above two methods can also solve the problem that can not be backed down at the same time.
When developing Ajax, network latency-- the interval between a user's request and the server's response-- needs to be carefully considered. Users will be bored if they are not given a clear response, if the data is not read in advance properly, or if the XMLHttpRequest is not handled properly.
The usual solution is to use a visual component to tell the user that the system is operating in the background and is reading data and content.
Of course, using Ajax also has the biggest advantages:
Is to be able to maintain data without updating the entire page. This allows Web applications to respond more quickly to user actions and avoids sending messages that have not changed over the network.
Ajax does not require any browser plug-ins, but requires the user to allow JavaScript to execute on the browser. Just like DHTML applications, Ajax applications must be rigorously tested on many different browsers and platforms. With the maturity of Ajax, some libraries that simplify the use of Ajax have come out one after another. Similarly, another programming aid technology has emerged to provide alternative functionality for users who do not support JavaScript.
This is the end of the content of "what are the shortcomings of ajax". Thank you for reading. If you want to know more about the industry, you can follow the website, the editor will output more high-quality practical articles for you!
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.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.