# Using the Web SDK via CDN source: https://developer.mastercard.com/open-finance-au/documentation/connect/integrating-with-connect/web-sdk/web-sdk-cdn/index.md This page explains what need to know about implementing our Connect Web SDK in your web application using our CDN (Content Delivery Network, a system of distributed servers that delivers web content to users based on their geographic location). Using the CDN method means you don't need to install the SDK via a package manager (npm). The advantages of this are: * You will not need to manage dependencies and build processes as this will be done for you - the CDN will host up to date versions of the SDK with all the necessary dependencies. * No package manager access issues - in some cases your development processes may mean that access to npm is restricted which could slow down integration. * Reduced load times - your application won't need to install the SDK, which if done at run-time could affect the application performance. ## CDN URL Structure {#cdn-url-structure} Our CDN URLs follow this pattern: `https://cdn.openbanking.mastercard.com/js/connect-web-sdk@{version}/mastercard-connect-esm.min.js` We use semantic versioning (semver) for our releases. This means the {version} number follows a pattern of MAJOR.MINOR.PATCH (e.g., 2.1.0), where: * MAJOR: Changed when we make incompatible API changes * MINOR: Added when we introduce new features in a backward-compatible manner * PATCH: Increased when we make backward-compatible bug fixes Tip: CDN distribution of the SDK is only available from version 2.1.0 onwards. We recommend using 2.2.0 or later. ## Understanding Our Build Types {#understanding-our-build-types} When you look at our CDN, you'll notice different files with names like `mastercard-connect-esm.min.js` or `mastercard-connect-umd.min.js`. Each build type is minified (compressed) for faster loading. Let's understand what these different files are and when to use them. ### Our Build Types {#our-build-types} We provide three different types of builds, each serving a specific purpose: 1. ESM (ECMAScript Modules) 2. UMD (Universal Module Definition) 3. IIFE (Immediately Invoked Function Expression) #### How to Choose the Right Build {#how-to-choose-the-right-build} 1. For modern web applications: * Use the ESM build (`mastercard-connect-esm.min.js`) * Benefits: Better tree-shaking, clearer dependency management 2. For maximum compatibility: * Use the UMD build (`mastercard-connect-umd.min.js`) * Benefits: Works everywhere, fallback support 3. For direct browser usage without build tools: * Use the IIFE build (`mastercard-connect-iife.min.js`) * Benefits: Simplest to integrate, no module system needed ## Implementation Guides {#implementation-guides} Click the tabs below based on whichever build you want to implement/integrate in your app. ### What Is ESM? {#what-is-esm} ESM represents the modern approach to JavaScript modules. ESM lets you write code in separate files (modules) that can be combined when needed. Each module can contain variables, functions, or classes that can be shared with other parts of your application. ### Why Use ESM? {#why-use-esm} ESM offers several compelling advantages that make it the preferred choice for modern web development: 1. Native Browser Support - Modern browsers understand ESM naturally, without needing extra tools. 2. Better Code Organization - ESM lets you split your code into smaller, focused files. 3. Tree Shaking - This is a special feature where the browser only loads the code you actually use. Imagine packing for a trip; instead of taking your entire wardrobe, you only pack what you'll wear. This makes your application faster and more efficient. 4. Clear Dependencies ### Implementation {#implementation} The CDN URL for the ESM build is as follows: `https://cdn.openbanking.mastercard.com/js/connect-web-sdk@2.2.0/mastercard-connect-esm.min.js` You need to add the SDK to your HTML file. With ESM, there are two ways to do this: * Directly import the SDK from the CDN into your HTML * Create a separate JavaScript file which imports the SDK from the CDN, then import that file in your HTML #### Method 1: Using type="module" in HTML (Recommended) {#method-1-using-typemodule-in-html-recommended} ```html