Ajax is a technique for loading data into part of a page without having to refresh the entire page. The data is often sent in a format called JavaScript Object Notation (or JSON).
WHAT IS AJAX?
You may have seen Ajax used on many websites
Live search (or auto complete) commonly uses Ajax. You may have seen it used on the Google website. when you type into the search bar on the homepage, sometimes you will see results coming up before your have finished typing.
Sometimes when your are shopping online and add items to your shopping cart, it is updated without you leaving the page. At the same time, the site may display a message confirming the item was added.
If you are registering for a website, a script may check whether your username is available before you have completed the rest of the form.
WHY USE AJAX?
Ajax uses an asynchronous processing model. This means the user can do other things while the web browser is waiting for the data to load, speeding up the user experience.
Using AJAX While Paging Loading
When a browser come across a <script> tag, it will typically stop processing the rest of the page until it has loaded and processed that script. This is known as a synchronous processing model.
When a page is loading, if a script needs to collect data from a server(e.g,., if it collects financial exchange rates or status updates), then the browser would not just wait for the script to be loaded and processed; it would also have to wait for a server to send the data that the script is going to display.
With Ajax, the browser can request some data from a server and - once that data has been requested - continue to load the rest of the page and process the user's interactions with the page. It is known as an asynchronous (or non-blocking) processing model.
With Ajax, if your only want to update a part of the page, you can just update the content of one element. This is done by intercepting an event (such as the user clicking on a ling or submitting a form) and requesting the new content from the server using an asynchronous request.
While that data is loading, the user can continue to interact with the rest of the page. Then, once the server has responded, a special Ajax event the new data from the server and updates just that one part of the part
Because you do not have to refresh the whole page, the data will load faster and the user can still use the rest of the page while they are waiting.
HOW AJAX WORKS
When using Ajax, the browser request information from a web server. It then processes the server's response and shows it within the page.
WHAT IS AJAX?
You may have seen Ajax used on many websites
Live search (or auto complete) commonly uses Ajax. You may have seen it used on the Google website. when you type into the search bar on the homepage, sometimes you will see results coming up before your have finished typing.
Sometimes when your are shopping online and add items to your shopping cart, it is updated without you leaving the page. At the same time, the site may display a message confirming the item was added.
If you are registering for a website, a script may check whether your username is available before you have completed the rest of the form.
WHY USE AJAX?
Ajax uses an asynchronous processing model. This means the user can do other things while the web browser is waiting for the data to load, speeding up the user experience.
Using AJAX While Paging Loading
When a browser come across a <script> tag, it will typically stop processing the rest of the page until it has loaded and processed that script. This is known as a synchronous processing model.
When a page is loading, if a script needs to collect data from a server(e.g,., if it collects financial exchange rates or status updates), then the browser would not just wait for the script to be loaded and processed; it would also have to wait for a server to send the data that the script is going to display.
With Ajax, the browser can request some data from a server and - once that data has been requested - continue to load the rest of the page and process the user's interactions with the page. It is known as an asynchronous (or non-blocking) processing model.
With Ajax, if your only want to update a part of the page, you can just update the content of one element. This is done by intercepting an event (such as the user clicking on a ling or submitting a form) and requesting the new content from the server using an asynchronous request.
While that data is loading, the user can continue to interact with the rest of the page. Then, once the server has responded, a special Ajax event the new data from the server and updates just that one part of the part
Because you do not have to refresh the whole page, the data will load faster and the user can still use the rest of the page while they are waiting.
HOW AJAX WORKS
When using Ajax, the browser request information from a web server. It then processes the server's response and shows it within the page.
0 Comments