I have a function of ajax add to cart in below file and doing section reload. below code is in app/design/frontend/MyThemeNS/Mytheme/web/js/custom.js (just mentioning sample for understanding.) require([ 'jquery', 'mage/url', 'Magento_Customer/js/customer-data', ], function ($, url, customerData) { .... ajax call function { on success : { ..... var sections = ['cart']; […]