Ajax - Vooq айти компания интернет программированиеVooq айти компания интернет программирование

Ajax is an approach to the creation of interactive application interfaces user. This approach is in the “background” data exchange of all data with the server browser. In the resulting web page when the update is not fully reloaded. This contributes to the speed and usability of the applications.

This software looks to be one of the XMLHttpRequest object. Its properties make possible the transfer of information to the server using Get or Post methods. Next, the server performs the necessary operations and gives you the answer. When using Ajax, you need to remember two rules. First transmitted and the received information is encoded in UTF-8. And second – XMLHttpRequest in different browsers is called differently.

The advantages of Ajax are:

  • reduced the load on the server (the whole page is not updated, and only handled a particular request);
  • less traffic (due to data only to specific parts of web pages);
  • Express interface response (the user can see the process of their actions due to fast load);
  • diversity in use (it is convenient for programming panels, chats).

Ajax operate using this combination:

  • CSS and (X)HTML for styling and presentation of information;
  • DOM-model provides a quick display of and interaction with information;
  • XMLHttpRequest is used for asynchronous communication with a web server;
  • when data is JSON.

Asynchronous communication allows you to simultaneously perform other actions.

AJAX application mainly consists of at least two parts. The first is written in JavaScript and runs in the browser. The second one is stored on the server and is written in Ruby or PHP.

This application is very useful for small items. They are associated with simple actions, for example, to subscribe or add to cart.

To exchange data on the page creates an XMLHttpRequest. He is an intermediary between the server and the user’s browser. With its help, a request is sent to the server. He also is responsible for receiving the response in the form of various data.

AJAX includes a specific set of technologies:

  • CSS to design web pages;
  • as a “frame” is used in HTML;
  • to change and retrieve information at the page built-in DOM;
  • for asynchronous data exchange exists XMLHttpRequest;
  • for the harmonious relations of all available technologies used JavaScript.

.