Why does stripe.js file load on all my site's pages?

It is normal to think that script sources shouldn't load on every page, however Stripe actually recommends this due to security and fraud prevention. 

Stripe recommends this:

"Include the Stripe.js script on each page of your site—it should always be loaded directly from https://js.stripe.com, rather than included in a bundle or hosted yourself.
To best leverage Stripe’s advanced fraud functionality, include this script on every page, not just the checkout page. This allows Stripe to detect anomalous behavior that may be indicative of fraud as customers browse your website."
June 29th, 2021: Optimizations Update OptimizePress Dashboard plugin version 1.0.52 

As of version 1.0.52, we have incorporated a setting to load Stripe JS file only on checkout pages. To find this setting, navigate to "OptimizePress3 > Optimizations" and on the "Assets" tab, you'll find a setting for this now as you see in the following screenshot: 

Loading Stripe JS file only on checkouts pages will disable Advanced Fraud Detection from Stripe, so you will want to consider this.

Did this answer your question? Thanks for the feedback There was a problem submitting your feedback. Please try again later.