Attach External CSS and JavaScript Estimated reading: 4 minutes 5 views Contributors Summary: Learn how to attach external CSS and JavaScript libraries from a CDN, choose load positions, and manage trusted dependencies for builder pages. Attach External CSS and JavaScript lets you load trusted third-party libraries from a CDN without copying files into your theme or page content. This feature is designed for advanced layouts, reusable UI components, and integrations that depend on external scripts or styles. It is especially useful when you need a framework, animation library, or utility stylesheet to support a specific page design. What this feature does With CDN attachments, you can add external CSS and JavaScript resources directly to a page or project. The builder then loads those resources on the frontend in the position you choose. You can place scripts in the head or at the end of the body, and control whether they use async or defer behavior when supported by the source. This approach keeps your content organized and reduces the need for manual theme edits. It also gives you a consistent way to load dependencies for imported designs, interactive sections, and page-level enhancements. When to use external CSS and JavaScript Use this feature when your page depends on a known external library rather than custom code written inside the builder. Common examples include icon libraries, sliders, animation tools, form helpers, or styling frameworks that must be available before your content renders correctly. Load a stylesheet from a trusted CDN for layout or component styling.Add a JavaScript library required by a page widget or custom integration.Control script timing with head placement, body placement, async, or defer.Keep external dependencies separate from your editable page content. If you are planning a page from imported content or a migrated design, this is also a practical way to restore the resources the original page relied on. How loading position affects performance Script location has a direct effect on rendering behavior. CSS resources are typically loaded early so the browser can style the page before it becomes visible. JavaScript can be loaded in the head when it must initialize early, or near the end of the body when it should not block rendering. Async and defer provide additional control. Async allows the browser to download the file without delaying other work, while defer tells the browser to download first and execute after parsing the document. Choose the option that matches the library’s requirements and the way your page is built. Recommended workflow Before adding an external file, confirm that the URL is reliable, versioned, and served over HTTPS. Then add only the assets required for the page. Keeping the list minimal helps reduce page weight and avoids conflicts between libraries. Identify the exact CSS or JavaScript dependency you need.Use a stable CDN URL from a trusted provider.Choose the correct load position for the script.Test the page on desktop and mobile after publishing. For pages built from reusable sections, review your component structure first so you know whether the asset should apply to one section or the entire page. Best practices for reliable delivery External assets should be treated as production dependencies. If a CDN file changes unexpectedly, your layout or interactions may also change. For that reason, use pinned versions whenever possible and avoid unnecessary libraries that duplicate functionality already available in the builder or theme. Prefer pinned versions instead of generic “latest” links.Load only one library for each feature set.Use defer for non-critical scripts when supported.Verify that styles and scripts do not conflict with your theme. If the page is part of a larger imported project, review the AI-generated structure and dependency plan before publishing. Security and compatibility notes Only include external files from sources you trust. Although the builder is designed to manage these attachments in a controlled way, the behavior of the loaded library still depends on the provider hosting the file. If a script is unavailable, the related feature may not work on the page. As a general rule, treat attached resources as part of your page’s technical stack. Test after each change, especially when adding a new version of a framework or when combining multiple libraries on the same page. Summary Attach External CSS and JavaScript gives you a structured way to connect CDN resources to your page. It is best used for trusted dependencies, carefully chosen load positions, and pages that need predictable styling or behavior beyond the builder’s native controls. Attach External CSS and JavaScript - PreviousCDN Library AttachmentsNext - Attach External CSS and JavaScriptControl Load Position and Async/Defer