Why isn't my cart price updating immediately after adding a custom line item?

I have added the Custom line item property through Ajax on Add to Cart but the value is not updating in one shot. I need to refresh to update the value on the cart page. Can anyone please look & guide me?

The way I do it is on the return of the ajax call, I just auto reload the cart page

window.location.href = '/cart';