This repository has been archived by the owner on Feb 23, 2024. It is now read-only.
Performance: Only load cart-fragments.js
when needed.
#7168
Labels
focus: performance
The issue/PR is related to performance.
type: enhancement
The issue is a request for an enhancement.
When a store is using the Cart and Checkout blocks and the Mini Cart Block, I'm assuming there is no need to load the
cart-fragments.js
script. Currently, that script loads on every page and has a performance hit on stores (because of the refresh Ajax requests). I did a really brief experiment disabling the loading of the script on a store that has all the above blocks active and as far as I can tell, nothing was broken. However, this will require more extensive testing on any implementation.Given articles like this out there, as well as solutions like this, I think it'd be a great optimization to implement this. Especially given the mini-cart block already has lazy-loading in place for performance.
The text was updated successfully, but these errors were encountered: