Brief Introduction to AJAX
Many of you may be wondering what is AJAX? and Why one should learn it? So let's have a look at how you can use AJAX with JavaScript, for developing a dynamic web application?
Before discussing about AJAX let's have a look at how browser's get information to display a page. When a browser requests a page from a website , then the browser in your machine is acting as a client. The website is being delivered through a machine that is serving up the information, therefore we call that a server.
When you ask for a page, the client makes a request to a server and the server returns a page. Sometimes when you are looking at a page you may want to ask for some additional information from the server. Say for ex: - That your page has some thumbnails for photo albums and perhaps the album has more thumbnails than you can see in the current view.
Without AJAX, if you want to see more thumbnails, you would have to make a request back to a server, who will send you a whole new page with additional thumbnails. That means the server ends up sending a lot of information that you don't ever need all over again.
With AJAX a server does not have to send you a whole page, it just sends you the pieces you need . In this case, it sends thumbnails, so how does that works? AJAX is not a single technology but a group of technology that works together to make that happen.
Technically, AJAX stands for Asynchronous JavaScript and XML. Lets us break it down piece by piece.
"Asynchronous" means a client can request a new pieces of information from the server at anytime. It does not have to wait for a page to reload. A request can be triggered by an event like a click on a button or bring over an image or whatever. The "J" in AJAX stands for JavaScript. JavaScript is where all this magic takes place. It handles the events that triggers new request , makes a request for a data to a server and takes care of updating only the part of the document, that needs to change.
JavaScript talks to a server through a set of methods called as API and uses what is called an XHR or XML HTTP request, this is where the X in AJAX comes from. The XHR API lets the browser to send and request data from a server. This can be a bit confusing because a lot of people thinks of XML as a language that used data which allow like HTML. Sometimes people assume that the X in AJAX means the data from an AJAX request has to be an XML. But the data they get transferred to and from the server can be in any format and it is usually either a text file or HTML or a JavaScript object like JSON.
So AJAX is really just a fancy term for technology let's you built pages that updates without requiring a page reload. JavaScript is the most of the heavy listing with AJAX and it is uses the XHR API to handle the communication between the client and server.
I Hope this helps you in knowing about AJAX to some extent that resolves your doubts.
Hostmyweb is Cheap Web Hosting Company to my knowledge which comeup with various features and is Best Shared Web Hosting Provider one should go for.
Basics of CloudFlare : How it works and it's benefits
What is Hypervisor? It's types and How they operate for creating virtual environments?
What is SEO in Digital Marketing ? What is OFF page / ON page SEO ?
What are Keywords in SEO? Types of Keywords in SEO.
What Relational Database Management System is all About? What is RDBMS?
Wordpress Vs Drupal Know which one is Better and Why?
What is Hypervisor? It's types and How they operate for creating virtual environments?
What is SEO in Digital Marketing ? What is OFF page / ON page SEO ?
What are Keywords in SEO? Types of Keywords in SEO.
Comments
Post a Comment