Stall library · Buy

Add to cart needs JavaScript the AI agent cannot run

This stall is an add to cart control that only works when scripts run, either because no such control exists in the delivered HTML or because the button submits nothing and relies entirely on a click handler. An AI agent reaching this page has chosen the product and has no way to act on the choice, so the journey ends one action short of a cart.

Why the agent stops

A form that posts, or a link that navigates, is an action any client can take. A button whose only behaviour is attached at runtime is an action only a client running that runtime can take. The difference is invisible on screen and total in effect.

This stall sits at the narrowest part of the journey, which is what makes it costly. Everything upstream succeeded: the product was found, read, and selected.

How often we see this

Not stated here. A frequency means nothing without the cohort it was counted over, and this page is about one stall rather than one category. Where a category has enough stores measured at every stage, the share of them showing this stall is published on its benchmark page, with the methodology beside it.

See it for yourself

  1. Fetch a product page with curl and look for a form containing an add to cart submit control, or a link that adds to the cart.
  2. Load the page in a browser with JavaScript disabled and try to add the product.
  3. Inspect the button and check whether it sits inside a form and has a name and value, or whether it is a bare button.

What to change

What Ottom looks at

The journey agent looks for an add to cart control and then checks whether it would actually submit anything: whether it sits inside a form, or is a link. A control that exists but submits nothing is reported the same way as one that is absent, because the outcome for the shopper is identical.

Questions

Why is a cart that needs JavaScript medium, not critical?

Because agents that drive a full browser can often get past it, so it blocks some agent traffic rather than all of it. The stalls rated critical block every agent, including the ones running a real browser.

Is a fetch based cart a problem for AI agents?

Not by itself, and plenty of stores work fine with one. The problem is when the fetch based path is the only path: an add to basket that exists purely as a click handler has nothing underneath it for a reader that did not run the script. A form that posts to the same endpoint costs nothing, changes nothing for your shoppers, and makes the page work without scripts.

Check your store for this