This article provides a potential fix for slow performance by removing
_isScopePrivate variables in private content. This reduces AJAX requests due to non-cacheable blocks so that you will have more free resources to handle more critical requests in Magento.
Affected products and versions
- Magento Commerce Cloud 2.2.x, 2.3.x
- Magento Commerce 2.2.x, 2.3.x
When private content blocks have the
_isScopePrivate variable in them, it makes the block not cacheable.
As a result, each request to Magento can trigger additional AJAX requests for the non-cacheable blocks.
Since private content is specific to individual users, it is reasonable to handle it on the client side (i.e., web browser) instead of hitting the server for retrieving the same data on each customer request.
Reduce AJAX requests due to non-cacheable blocks. This will enable you to have more free resources to handle more business-critical scenarios in your store, such as these examples:
- Add to cart
- Make a payment
- Place order
- Register new customer
Use private content instead of the
_isScopePrivate variable. Review DevDocs' Private content for details.
Also review High throughput AJAX requests cause poor performance.