from the server, it then decides wh
Although the name AJAX (asynchronous JavaScript and XML) first appeared publicly in April 2005 in an article by J.J. Garrett, entitled Ajax: A New Approach to Web Applications , its history is much older. AJAX has been around since 1999, when Microsoft introduced the fifth version of its browser. What exactly is AJAX? The meaning of this vague acronym is generally associated with the use of the object XMLHttpRequestand related techniques. This is how it is understood in this and the next article, however, it could be interpreted much more broadly.
The way to the standard
Internet Explorer was the only browser to support AJAX for a while, but competing browsers soon adopted its novelty. However, they implemented AJAX differently. The difference was in the object through which data is obtained from the server via the HTTP protocol. In IE it was an object ActiveX, elsewhere it was an object XMLHttpRequest. Therefore, when editing older scripts, you may encounter a mysterious construction that looks something like this:ether it really requests it.
The “XML” at the beginning
the object name XMLHttpRequestis somewhat misleading. XML is rarely used for AJAX purposes. While data structuring is necessary, web developers quickly discovered that traversing the XML tree structure is no easy feat, let alone extracting HTML snippets from XML. So they were looking for a more usable format for the given purpose. And what did their advisors find? JSON.
Data in this format can be understood as an object literal – the syntax is basically the same. This circumstance makes it possible to work with this data as an object literal. JSON is also suitable from a security point of view. It usa phone number data cannot contain any functions and commands. However, since JSON was not an AJAX output format, the output (the string obtained as the property value responseText) had to be first processed, preferably by a parser, into actual JSON before it could be treated as an object literal.
However, this line of javascript code
would fail in old browsers, e.g. IE only supports JSON parser from the eighth version. Therefore, web how brand social media marketing has evolved developers had to either add a client-side parser to their applications themselves, or convert strings to JSON objects simply using the function eval(), the latter method not necessarily being secure in all circumstances.
The standard is growing
Since the tenth version, Internet Explorer also finally supports the object API extension XMLHttpRequest, which was originally bz lists developed as the second level (English level) of the XMLHttpRequest specification, but later the two merged.