How to update the current cart using AJAX?

is there any way so we can update cart and delete items from the cart using ajax.

also we could update total as well.

any suggestion ?

How is the mini-cart AJAX update implemented?