嫌疑人是什么意思| 沸去掉三点水念什么| 1985年属牛的是什么命| 胃溃疡不能吃什么食物| 子宫直肠陷凹什么意思| 朱砂是什么意思| 知柏地黄丸适合什么人吃| 樱桃跟车厘子有什么区别| 感冒什么症状| mds是什么病| 散瞳是什么意思| lga是什么意思| 什么不能托运| 圆脸适合什么发型女| 孵化是什么意思| 蹲不下去是什么原因| 耳鸣什么原因引起的| 血管瘤是什么病严重吗| 月经提前半个月来是什么原因| 梦到自行车丢了是什么意思| 驴打滚是什么意思| 糖类抗原ca125偏高是什么原因| 血糖高的人可以吃什么水果| 与自己和解什么意思| 看见蜈蚣有什么预兆| 斐然是什么意思| 连长相当于地方什么官| 美国为什么不建高铁| 小腿肿胀是什么原因引起的| 做什么生意最赚钱| 什么病不能喝酒| 彩虹像什么挂在天空| 牙龈萎缩是什么样子| 辣条是什么意思| 总是打哈欠是什么原因| 立是什么结构的字| 什么散步填词语| 夏天吃什么水果| 牙龈上火是什么原因引起的| 检测hpv挂什么科| 麸炒是什么意思| 癫痫吃什么药| 为什么会一直打嗝| 什么的叫| petct是什么检查| 例假推迟是什么原因引起的| 基点是什么意思| 小孩脱发是什么原因引起的| 牙齿过敏吃什么药| 风热感冒用什么药好| 梨花代表什么生肖| 荨麻疹要用什么药| 取什么补什么| 肠梗阻是因为什么原因引起的| 千年等一回是什么生肖| 痛风什么症状| 干眼症什么症状| 海阔什么| 美味佳肴是什么意思| 开放性神经管缺陷是什么意思| 心肌供血不足吃什么药| 什么是莱赛尔纤维| 除氯是什么意思| 霉菌阴道炎是什么引起的| 胸闷气短是什么病| 梦见玉碎了是什么意思| 吃什么能去黑眼圈| 腰痛贴什么膏药最好| 三月六日是什么星座| 多管闲事是什么意思| 心肌炎有什么症状和表现| 风疹病毒抗体偏高是什么意思| 南瓜是什么形状| 上当是什么意思| 急性肠胃炎应该吃什么药| 芈月和秦始皇什么关系| 蛋白尿是什么颜色| 偏财代表什么| 什么病会晕倒| 溪字五行属什么| aquascutum是什么牌子| 车厘子是什么季节的| 晚上睡觉脚抽搐是什么原因| 三十年婚姻是什么婚| 感冒全身酸痛吃什么药| 儿童个子矮小看什么科| 西洋参吃了有什么好处| 北瓜是什么| 忘忧草是什么意思| 喝咖啡困倦是什么原因| 白细胞阳性什么意思| 对偶是什么意思| 白露是什么季节的节气| fossil是什么意思| 多西他赛是什么药| 粘液阳性是什么意思| 什么人容易得血栓| 电泳是什么意思| 血稠是什么原因引起的| 故事梗概是什么意思| 前列腺炎是什么| 老流鼻血是什么原因| 杭盖是什么意思| 小孩睡觉流鼻血是什么原因引起的| 煎牛排用什么锅| 肿气肿用什么药比较好| 梦见自己头发长长了是什么意思| abr是什么检查| 饭后呕吐是什么原因引起的| 贿赂是什么意思| 数位板是什么| 尿泡多是什么原因| 老人适合吃什么水果| 口腔溃疡是缺什么维生素| 衣原体阳性是什么病| 后半夜咳嗽是什么原因| 怀孕40天有什么症状| 牌匾是什么意思| 尿酸是什么| 香港说什么语言| 包涵是什么意思| 蔓越莓有什么功效| 钠对人体有什么作用| 肠易激综合征是什么原因造成的| 未可以加什么偏旁| 正常尿液是什么味道| 每天头疼是什么原因引起的| 吃避孕药对身体有什么影响| lagogo是什么牌子| 什么叫血沉| 97年是什么生肖| 蜈蚣怕什么| 江小白是什么酒| 若叶青汁有什么功效| 打下手什么意思| 便秘什么原因引起的| 感性什么意思| www指什么| 善根是什么意思| 什么是滑脉| 讳疾忌医是什么意思| fgr医学上是什么意思| aoa是什么意思| 热气是什么意思| 细菌性痢疾症状是什么| 为什么脚会抽筋| 前列腺不能吃什么食物| 生化是检查什么的| 增生期子宫内膜是什么意思| 空调用什么插座| 口臭是什么原因| 头发老是出油是什么原因| 胃挂什么科| 流光是什么意思| 剁椒鱼头是什么菜系| 鱼腥草泡水喝有什么功效| 荷花代表什么象征意义| 调停是什么意思| 没有美瞳护理液用什么代替| 肝炎五项检查是什么| 虚劳病是什么病| 才能是什么意思| 雌二醇测定是什么检查| 尿素高吃什么药| 2倍是什么意思| 好吧是什么意思| 什么病不能吃玉米| 眼睛黑色部分叫什么| 吃苦荞有什么好处| av是什么| 冠脉cta主要检查什么| 吕洞宾是什么生肖| 野生天麻长什么样图片| 大虾不能和什么一起吃| 送礼送什么| 手发胀是什么原因造成的| 土豆粉是什么做的| 什么是比热容| 彼岸花代表什么星座| hr是什么牌子| 焦虑什么意思| 六月十四号是什么星座| 手上长毛是什么原因| 亡羊补牢说明什么道理| 痛经吃什么食物| ptsd是什么| 客家人什么意思| 为什么抽烟就想拉屎| 不二人选是什么意思| 婚检都检查什么| 精益求精下一句是什么| 大头鱼是什么鱼| 不是你撞的为什么要扶| 属羊人佩戴什么旺自己| 空调买什么牌子好| 腰椎骨质增生是什么意思| 高光是什么意思| MR医学上是什么意思| 甲状腺球蛋白低是什么原因| 痔疮吃什么水果| 囊性回声是什么意思| 田七蒸瘦肉有什么功效| 手心脚心热是什么原因| 李白为什么叫青莲居士| 尿血吃什么药| 总蛋白高是什么原因| grader是什么意思| 掌心痣代表什么意思| 甲壳素是什么东西| 意思是什么意思| 64年属什么生肖| 一台什么| 小孩子睡觉流口水是什么原因| 宝宝什么时候断奶最好| 头疼去医院挂什么科| 吃猪皮有什么好处和坏处| 货比三家是什么意思| 金针菇不能和什么一起吃| 什么食物含有维生素d| 腱鞘炎用什么药能治好| 导盲犬一般是什么品种| 拜观音菩萨有什么讲究| 晚上脚抽筋是什么原因| 炒房是什么意思| 什么是生理期| 图谋不轨什么意思| 牛头不对马嘴是什么意思| 梅毒单阳性是什么意思| 备孕怀男孩做什么准备| 颈椎不舒服挂什么科| 1978年出生是什么命| 航母舰长是什么级别| 什么是息肉| 尾巴骨疼挂什么科| 阿尔茨海默症吃什么药| 什么是干燥综合症| 双抗是什么药| 或是什么意思| 里长是什么官| 滑囊炎吃什么药| 为什么会打呼| 孕妇吃什么水果好对胎儿好| 乳房里面有硬块是什么原因| mens是什么意思| 脉搏跳得快是什么原因| 忙什么呢幽默的回答| 佛法无边是什么生肖| 里程是什么意思| 人参泡酒有什么功效和作用| 浅表性胃炎伴糜烂吃什么药效果好| 50年是什么婚姻| 转述句是什么意思| 棉纱是什么面料| 陆地上最大的动物是什么| ushi是什么品牌男装| 看见喜鹊有什么预兆| 梦见吃老鼠肉是什么意思啊| 阴道疼痛什么原因| 沉默不是代表我的错是什么歌| 口里发酸是什么原因| 口若什么什么| 总免疫球蛋白e是什么| 沆瀣一气是什么意思| 砷对人体有什么危害| 百度Jump to content

药企频接价格垄断罚单 分析称上

From Wikipedia, the free encyclopedia
百度   澎湃新闻记者观察到,GST台车的外壳为软性材料,若发生碰撞,将可以避免测试车辆及人员损伤,而工程师通过远程遥控就可以让这辆车,前进、转向、倒退,十分自如。

Asynchronous JavaScript and XML
First appearedMarch 1999
Filename extensions.js
File formatsJavaScript
Influenced by
JavaScript and XML

Ajax (also AJAX /?e?d??ks/; short for "asynchronous JavaScript and XML"[1][2]) is a set of web development techniques that uses various web technologies on the client-side to create asynchronous web applications. With Ajax, web applications can send and retrieve data from a server asynchronously (in the background) without interfering with the display and behaviour of the existing page. By decoupling the data interchange layer from the presentation layer, Ajax allows web pages and, by extension, web applications, to change content dynamically without the need to reload the entire page.[3] In practice, modern implementations commonly utilize JSON instead of XML.

Ajax is not a technology, but rather a programming pattern. HTML and CSS can be used in combination to mark up and style information. The webpage can be modified by JavaScript to dynamically display (and allow the user to interact with) the new information. The built-in XMLHttpRequest object is used to execute Ajax on webpages, allowing websites to load content onto the screen without refreshing the page. Ajax is not a new technology, nor is it a new language. Instead, it is existing technologies used in a new way.

History

[edit]

In the early-to-mid 1990s, most Websites were based on complete HTML pages. Each user action required a complete new page to be loaded from the server. This process was inefficient, as reflected by the user experience: all page content disappeared, then the new page appeared. Each time the browser reloaded a page because of a partial change, all the content had to be re-sent, even though only some of the information had changed. This placed additional load on the server and made bandwidth a limiting factor in performance.

In 1996, the iframe tag was introduced by Internet Explorer; like the object element,[citation needed] it can load a part of the web page asynchronously. In 1998, the Microsoft Outlook Web Access team developed the concept behind the XMLHttpRequest scripting object.[4] It appeared as XMLHTTP in the second version of the MSXML library,[4][5] which shipped with Internet Explorer 5.0 in March 1999.[6]

The functionality of the Windows XMLHTTP ActiveX control in IE 5 was later implemented by Mozilla Firefox, Safari, Opera, Google Chrome, and other browsers as the XMLHttpRequest JavaScript object.[7] Microsoft adopted the native XMLHttpRequest model as of Internet Explorer 7. The ActiveX version is still supported in Internet Explorer and on "Internet Explorer mode" in Microsoft Edge. The utility of these background HTTP requests and asynchronous Web technologies remained fairly obscure until it started appearing in large scale online applications such as Outlook Web Access (2000)[8] and Oddpost (2002).[9]

Google made a wide deployment of standards-compliant, cross browser Ajax with Gmail (2004) and Google Maps (2005).[10] In October 2004 Kayak.com's public beta release was among the first large-scale e-commerce uses of what their developers at that time called "the xml http thing".[11] This increased interest in Ajax among web program developers.

The term AJAX was publicly used on 18 February 2005 by Jesse James Garrett in an article titled Ajax: A New Approach to Web Applications, based on techniques used on Google pages.[1]

On 5 April 2006, the World Wide Web Consortium (W3C) released the first draft specification for the XMLHttpRequest object in an attempt to create an official Web standard.[12] The latest draft of the XMLHttpRequest object was published on 6 October 2016,[13] and the XMLHttpRequest specification is now a living standard.[14]

Technologies

[edit]
The conventional model for a Web Application versus an application using Ajax

The term Ajax has come to represent a broad group of Web technologies that can be used to implement a Web application that communicates with a server in the background, without interfering with the current state of the page. In the article that coined the term Ajax,[1][3] Jesse James Garrett explained that the following technologies are incorporated:

Since then, however, there have been a number of developments in the technologies used in an Ajax application, and in the definition of the term Ajax itself. XML is no longer required for data interchange and, therefore, XSLT is no longer required for the manipulation of data. JavaScript Object Notation (JSON) is often used as an alternative format for data interchange,[15] although other formats such as preformatted HTML or plain text can also be used.[16] A variety of popular JavaScript libraries, including jQuery, include abstractions to assist in executing Ajax requests.

Examples

[edit]

JavaScript example

[edit]

An example of a simple Ajax request using the GET method, written in JavaScript.

get-ajax-data.js:

// This is the client-side script.

// Initialize the HTTP request.
let xhr = new XMLHttpRequest();
// define the request
xhr.open('GET', 'send-ajax-data.php');

// Track the state changes of the request.
xhr.onreadystatechange = function () {
	const DONE = 4; // readyState 4 means the request is done.
	const OK = 200; // status 200 is a successful return.
	if (xhr.readyState === DONE) {
		if (xhr.status === OK) {
			console.log(xhr.responseText); // 'This is the output.'
		} else {
			console.log('Error: ' + xhr.status); // An error occurred during the request.
		}
	}
};

// Send the request to send-ajax-data.php
xhr.send(null);

send-ajax-data.php:

<?php
// This is the server-side script.

// Set the content type.
header('Content-Type: text/plain');

// Send the data back.
echo "This is the output.";
?>

Fetch example

[edit]

Fetch is a native JavaScript API.[17] According to Google Developers Documentation, "Fetch makes it easier to make web requests and handle responses than with the older XMLHttpRequest."[18]

fetch('send-ajax-data.php')
    .then(data => console.log(data))
    .catch (error => console.log('Error:' + error));

ES7 async/await example

[edit]
async function doAjax1() {
    try {
        const res = await fetch('send-ajax-data.php');
        const data = await res.text();
        console.log(data);
    } catch (error) {
        console.log('Error:' + error);
    }
}

doAjax1();

Fetch relies on JavaScript promises.

The fetch specification differs from Ajax in the following significant ways:

  • The Promise returned from fetch() won't reject on HTTP error status even if the response is an HTTP 404 or 500. Instead, as soon as the server responds with headers, the Promise will resolve normally (with the ok property of the response set to false if the response isn't in the range 200–299), and it will only reject on network failure or if anything prevented the request from completing.
  • fetch() won't send cross-origin cookies unless you set the credentials init option. (Since April 2018. The spec changed the default credentials policy to same-origin. Firefox changed since 61.0b13.)

Benefits

[edit]

Ajax offers several benefits that can significantly enhance web application performance and user experience. By reducing server traffic and improving speed, Ajax plays a crucial role in modern web development. One key advantage of Ajax is its capacity to render web applications without requiring data retrieval, resulting in reduced server traffic. This optimization minimizes response times on both the server and client sides, eliminating the need for users to endure loading screens.[19]

Furthermore, Ajax facilitates asynchronous processing by simplifying the utilization of XmlHttpRequest, which enables efficient handling of requests for asynchronous data retrieval. Additionally, the dynamic loading of content enhances the application's performance significantly.[20]

Besides, Ajax enjoys broad support across all major web browsers, including Microsoft Internet Explorer versions 5 and above, Mozilla Firefox versions 1.0 and beyond, Opera versions 7.6 and above, and Apple Safari versions 1.2 and higher.[21]

See also

[edit]

References

[edit]
  1. ^ a b c Jesse James Garrett (18 February 2005). "Ajax: A New Approach to Web Applications". AdaptivePath.com. Archived from the original on 10 September 2015. Retrieved 19 June 2008.
  2. ^ "Ajax - Web developer guides". MDN Web Docs. Archived from the original on 28 February 2018. Retrieved 27 February 2018.
  3. ^ a b Ullman, Chris (March 2007). Beginning Ajax. wrox. ISBN 978-0-470-10675-4. Archived from the original on 5 July 2008. Retrieved 24 June 2008.
  4. ^ a b "Article on the history of XMLHTTP by an original developer". Alexhopmann.com. 31 January 2007. Archived from the original on 23 June 2007. Retrieved 14 July 2009.
  5. ^ "Specification of the IXMLHTTPRequest interface from the Microsoft Developer Network". Msdn.microsoft.com. Archived from the original on 26 May 2016. Retrieved 14 July 2009.
  6. ^ Dutta, Sunava (23 January 2006). "Native XMLHTTPRequest object". IEBlog. Microsoft. Archived from the original on 6 March 2010. Retrieved 30 November 2006.
  7. ^ "Dynamic HTML and XML: The XMLHttpRequest Object". Apple Inc. Archived from the original on 9 May 2008. Retrieved 25 June 2008.
  8. ^ Hopmann, Alex. "Story of XMLHTTP". Alex Hopmann’s Blog. Archived from the original on 30 March 2010. Retrieved 17 May 2010.
  9. ^ Tynan, Dan (1 October 2007). "The 16 Greatest Moments in Web History". Entrepreneur.
  10. ^ "A Brief History of Ajax". Aaron Swartz. 22 December 2005. Archived from the original on 3 June 2010. Retrieved 4 August 2009.
  11. ^ English, Paul (12 April 2006). "Kayak User Interface". Official Kayak.com Technoblog. Archived from the original on 23 May 2014. Retrieved 22 May 2014.
  12. ^ van Kesteren, Anne; Jackson, Dean (5 April 2006). "The XMLHttpRequest Object". W3.org. World Wide Web Consortium. Archived from the original on 16 May 2008. Retrieved 25 June 2008.
  13. ^ Kesteren, Anne; Aubourg, Julian; Song, Jungkee; Steen, Hallvord R. M. "XMLHttpRequest Level 1". W3.org. W3C. Archived from the original on 13 July 2017. Retrieved 19 February 2019.
  14. ^ "XMLHttpRequest Standard". xhr.spec.whatwg.org. Retrieved 21 April 2020.
  15. ^ "JavaScript Object Notation". Apache.org. Archived from the original on 16 June 2008. Retrieved 4 July 2008.
  16. ^ "Speed Up Your Ajax-based Apps with JSON". DevX.com. Archived from the original on 4 July 2008. Retrieved 4 July 2008.
  17. ^ "Fetch API - Web APIs". MDN. Archived from the original on 29 May 2019. Retrieved 30 May 2019.
  18. ^ "Working with the Fetch API". Google Developers. Archived from the original on 30 September 2018. Retrieved 6 June 2025.
  19. ^ "What is AJAX? Advantages & Disadvantages of Ajax?". magaplaza. Archived from the original on 6 October 2023. Retrieved 6 October 2023.
  20. ^ "What is AJAX? Advantages & Disadvantages of AjaxAdvantages And Disadvantages Of AJAX – You Know About Them". POTENZA. Archived from the original on 6 October 2023. Retrieved 6 October 2023.
  21. ^ "Top 5+ Advantages and Disadvantages of AJAX". POTENZA. 16 January 2022. Archived from the original on 6 October 2023. Retrieved 6 October 2023.

Further reading

[edit]


改良碱性土壤用什么 朱元璋属什么生肖 心有余而力不足什么意思 什么时候开始孕吐 吃什么可以调理肠胃
5月22日是什么星座 金钱能买来什么但买不来什么 滋阴潜阳是什么意思 jk制服是什么意思 颈椎头晕吃点什么药
石榴花什么时候开 红米是什么米 耳朵蝉鸣是什么原因引起的 处女膜是什么颜色 直接胆红素偏高是什么原因
浮想联翩是什么意思 医保是什么 为什么手机会发烫 橡胶过敏是什么症状 什么原因
孕妇为什么不能吃山楂hebeidezhi.com 反射弧长是什么意思hcv8jop9ns5r.cn 什么秒必争hcv8jop8ns9r.cn 醒酒喝什么hcv9jop1ns8r.cn 吃什么东西涨奶最快hcv8jop4ns0r.cn
糖耐主要是检查什么hcv7jop9ns9r.cn 清凉补是什么hcv9jop7ns4r.cn 舒肝解郁胶囊治什么病hcv9jop6ns1r.cn 额头出汗多是什么原因hcv8jop5ns3r.cn 鸡同鸭讲是什么意思hcv8jop9ns5r.cn
小粉是什么粉hcv8jop5ns1r.cn 猫三联什么时候打hcv8jop5ns2r.cn 女性尿道出血是什么原因引起的hcv7jop5ns2r.cn 郑州机场叫什么名字wzqsfys.com 风包念什么hcv9jop7ns1r.cn
栀是什么意思zsyouku.com 中国特工组织叫什么sanhestory.com tc是什么意思hcv8jop2ns2r.cn 马眼是什么意思hcv8jop8ns0r.cn 芋头不能和什么一起吃hanqikai.com
百度