Cart Not Showing Product in it until it's been refreshed

When ever a product is added to cart, if I hover on the cart icon it shows the product but when I click on the icon and it takes me to the cart full page it won’t display any products until I refresh the page.

What do I do on that!

Yes I need it

Hey @Ladymia

This script should be added to your cart page’s JavaScript file.

document.addEventListener('DOMContentLoaded', function() {
  // Refresh the cart page after it has loaded.
  location.reload();
});

Please must take a backup of your theme or try this script on a duplicate theme.

Thanks

Thanks I really appreciate

This is a screenshot to explain it properly when I add my product to cart it shows I have added 1 product but when I try to click on it it shows “Your Cart Is Empty” and it can’t be clicked if I try clicking it.

You can also try it this is the link celestialfashion101.com