How to alert customers about free shipping threshold?

How to ensure that the message updates dynamically every time the customer adds or removes items from their cart in real time without refreshing the page?