You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
AJAX = Asynchronous JavaScript and XML (Asynchronous JavaScript and XML).
Ajax is a technique for creating fast, dynamic web pages. Ajax is one way to do this without reloading the entire web
Page case, able to update part of the web page technology.
Traditional web pages (without Ajax) must reload the entire page if they need to be updated.
Advantages:
Reduce the burden on the server, fetch data on demand, and minimize redundant requests
Partial page refresh, reduce the user's psychological and actual waiting time, bring better user experience
Based on XML standardization, it is widely supported, no plug-ins need to be installed, etc., which further facilitates the separation of pages and data
Disadvantages:
AJAX makes extensive use of javascript and AJAX engines, depending on browser support
Consider browser compatibility.
AJAX is only a partial refresh, so the back button on the page is useless.
Streaming media and mobile device support is not too easy to wait
How AJAX works:
Create the ajax object (XMLHttpRequest/ActiveXObject (Microsoft. XMLHttp))
Determine the mode of data transfer (GET/POST)
Open link ()
Send the send ()
When the ajax object completes the fourth step (onreadystatechange) data reception, determine HTTP
The response status is between 200 and 300 or 304 (cache) executes the callback function
定义和用法:
AJAX = Asynchronous JavaScript and XML(异步的 JavaScript 和 XML)。
Ajax 是一种用于创建快速动态网页的技术。Ajax 是一种在无需重新加载整个网
页的情况下,能够更新部分网页的技术。
传统的网页(不使用 Ajax)如果需要更新内容,必须重载整个网页页面。
优点:
缺点:
的时候考虑对浏览器的兼容性.
AJAX 的工作原理:
响应状态(status)200-300 之间或者 304(缓存)执行回调函数
The text was updated successfully, but these errors were encountered: