An example of AJAX in use is Gmail. We interact with the web site to fetch new emails, compose, read and delete emails etc. We do all this without changing the basic structure or feel of the Gmail web page or application. Magento 2 uses AJAX to build the shopping carts – the buyer can add items to the shopping cart, specify details regarding the order (size, colors, quantity, etc.) and continue to browse through the website and shop seamlessly.