JavaScript

Last Updated: 4/13/2023

Network Request

  • You can send network requests to the server and load new information whenever it’s needed without reloading the page
  • Example
    • Submit an order,
    • Load user information,
    • Receive latest updates from the server,
    • Ways to send network request
      • AJAX
      • Fetch

AJAX

  • Asynchronous JavaScript and XML, or Ajax is an approach to using a number of existing technologies together, including HTML or XHTML, CSS, JavaScript, DOM, XML, XSLT, and most importantly the XMLHttpRequest object
  • When these technologies are combined in the Ajax model, web applications are able to make quick, incremental updates to the user interface without reloading the entire browser page. This makes the application faster and more responsive to user actions.
  • Both JSON and XML are used for packaging information in the Ajax model.

Fetch API

  • The Fetch API provides an interface for fetching resources.