Why is the Ajax API causing slow 'add to cart' action on my store?

Topic summary

Slow add-to-cart behavior using Shopify’s AJAX API, with items taking up to ~15 seconds to appear in the cart after adding. The store integrates a custom book editor; each customized book equals a unique Shopify product.

Process described: call cart/add.js, poll cart.js every 5 seconds to check presence, then redirect to basket. Concern raised that API performance—or the large number of products—may be causing the delay.

Counterpoint: another participant suggests the issue is more likely theme or code-related. They state that using the AJAX API typically results in items appearing within 3–4 seconds and advise a developer review/fix.

Key term: AJAX API (client-side requests to Shopify endpoints to add items and retrieve cart contents).

Actions/next steps: investigate theme/custom code and polling logic; consider optimizing or debugging the add-to-cart flow. Offer of assistance was made.

Status: unresolved; no confirmed root cause or fix yet.

Summarized with AI on February 9. AI used: gpt-5.

Hello,

We are facing slow “add to cart” action with our store.

We have customized Shopify to integrate our custom book editor and use the “Ajax API” to allow our users to add products to their cards before redirecting them to the basket page.

We found out that it can take up to 15 seconds for an added product to appear in the cart.

To add a product to our customer basket, we use the AJAX API

What we do is the following:

We noticed that the product can take up to ~15 seconds to appear in the basket.

We think it’s a performance issue on the Shopify API side, does anyone experience the same behavior?

We wonder if it’s not related to the large number of products we have (1 customized book = 1 unique Shopify product)

Thank you in advance,

Olivier

Hello @oliviermsb ,

There might be an issue with the theme code or some other code-related issue because if you are using Ajax API we can add products to the cart within 3-4 secs.

Ask your developer to fix this issue.

Let us know if you need any further help.

All the best,

CedCommerce