Skip to content

Lazy load caused a double request #766

Description

@limesharp-dev

PLP cards (plp-nosto-product-card)
Separately, each of the 12 PLP nosto-dynamic-card elements is making 2 requests instead of 1. The most likely cause is the lazy="true" attribute triggering a request both on DOM connection AND on the IntersectionObserver callback, which is a bug/quirk in the nosto-dynamic-card web component.
Combined at peak load:
24 requests from rec carousel clones
24 requests from PLP double-fetch
=48 simultaneous Shopify section rendering calls → 429s

Where to fix
Fix 1 (recommendation carousel — highest impact): Change nosto-recommendations.js from type: "loop" to type: "slide" or type: "rewind". Neither creates clone slides, so the duplicate requests disappear entirely. This is a theme file change, not a Nosto template change.
Fix 2 (PLP double-fetch): This is in the DynamicCardProduct.jsx nosto-dynamic-card behaviour with lazy="true". Worth raising with Nosto support as a bug in the SDK — the custom element should not fire both on connect and on intersection.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions