Regression: Allow sites to opt out from global stripe js loading

Created on 2 August 2024, 8 months ago
Updated 27 August 2024, 7 months ago

Problem/Motivation

In earlier versions of the module, stripe js was not loaded on every page of the site. This changed in a recent commit somewhere, possibly involving the stripe payment element.

Loading js globally represents a considerable performance hit for supposed security gains. We can see up to a second of extra load time depending on network conditions. Stripe "recommends" loading their js globally, but it is not a requirement.

See #3083393: Limit Stripe scripts and cookies to pages where they are required .

Steps to reproduce

Enable the stripe card element gateway. Notice stripe.js is loaded on every single page of the site, not just where it is required (checkout).

Proposed resolution

I guess we are stuck with it now. Keep the current behaviour but add an override checkbox in configuration (checked by default).

🐛 Bug report
Status

Fixed

Version

1.0

Component

Code

Created by

🇳🇿New Zealand john pitcairn

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Merge Requests

Comments & Activities

Production build 0.71.5 2024