Difference between AJAX and JSON
In the 1990’s a majority of web pages were static and were completer HTML pages. Even for small changes to be made as a result of a query from the user, the entire web page was loaded from the server again and again. This resulted in wasted bandwidth. Asynchronous loading was introduced for the first time in 1995 when Java Applets came into existence. XMLHTTP ActiveX Control was introduced in 1999 with the emergence of IE 5. In 2004 and 2005, extensive use of AJAX was witnessed in Gmail and Google Maps. It was in 2005 when the term AJAX was coined.
JSON was popularized by Douglas Crockforad. An official website json.org was launched in 2002. Yahoo! and Google were among the first tech companies to use JSON format in some of their web services.
Similarities and Differences
- Used for the development of interactive web pages.
- There are some drawbacks like separate testing and coding methods and longer response times.
- One might face some security threats while using JSON format.
- Various data types used are integers, strings, arrays, Boolean and objects.
- One can use AJAX to transmit objects in JSON format asynchronously.