(function () { window.onpageshow = function() { // We force re-freshing the cart content onpageshow, as most browsers will serve a cache copy when hitting the // back button, which cause staled data document.documentElement.dispatchEvent(new CustomEvent('cart:refresh', { bubbles: true, detail: {scrollToTop: false} })); }; })();