Third-Party Acceleration

Key Takeaways

  • Unified Connection: Speed Kit consolidates requests for external resources, fetching them through a single, highly optimized HTTP/3 connection instead of multiple slow connections to different domains.
  • Targeted Acceleration: The feature can accelerate any third-party asset that is inefficiently cached by its provider, such as static JavaScript libraries and fonts, mitigating performance bottlenecks from external dependencies.
  • Increased Resilience: By caching external assets, Speed Kit prevents third-party outages from becoming a single point of failure for your site, ensuring it remains functional even if a dependency is down.

Introduction

Modern e-commerce sites rely heavily on a wide array of third-party scripts for analytics, marketing, user engagement, and more. While essential, these external resources often create significant performance bottlenecks, as each one requires a separate connection that can slow down page loads. Speed Kit’s Third-Party Acceleration solves this problem by fundamentally changing how these assets are requested. By routing them through its own high-speed infrastructure, Speed Kit reduces network overhead, improves security, and applies its powerful caching logic to resources that are typically uncacheable.

Accelerating External Resources

How It Works

Speed Kit’s Service Worker intercepts outgoing requests for whitelisted third-party domains directly in the user's browser. This method is effective for any third-party resource delivered as a static file, such as JavaScript, CSS, fonts, or images. Instead of allowing the browser to establish numerous individual connections, it rewrites these requests on the fly and fetches the assets through a single, persistent HTTP/3 connection to Speed Kit’s high-performance delivery network.

These JavaScript files are then cached by Speed Kit. To ensure content remains current, Speed Kit automatically revalidates each cached file with the original third-party provider every 10 minutes. For full control, customers can manually trigger an update for any cached third-party resource at any time, either directly from the Speed Kit dashboard or programmatically via an API.

Core Benefits

  • Performance Boost: By serving assets from a powerful cache and using an optimized connection, Speed Kit dramatically reduces the load times for external scripts. This benefit applies to large, static JavaScript bundles, provided they are non-personalized and do not dynamically change based on user properties like location or browser.
  • Increased Resilience: Synchronously loaded third-party assets, like custom fonts or critical scripts, can become a single point of failure. If the external provider has an outage, it can block your entire page from rendering. Speed Kit mitigates this risk by serving a cached version of the asset from its resilient infrastructure, ensuring your site remains functional even if a third-party service is down.
  • Minimized Network Latency: Establishing a new connection for each third-party domain creates significant latency from repetitive DNS lookups and security handshakes. Speed Kit eliminates this overhead by consolidating requests onto a single, persistent connection, which drastically reduces the time spent on network round trips.

Requirements for Acceleration

Third-party acceleration is enabled only when a clear performance bottleneck is identified or when explicitly requested by the customer.

The primary requirement for accelerating an external resource is that the asset must be safe to cache. This means the asset must be static and non-personalized—the exact same file must be served to every user of the page. This ensures that a single cached version can be delivered to all users without any risk of breaking functionality or exposing user-specific data. Common candidates are static JavaScript libraries, fonts, images, and CSS files.

Click and paste Side Panel Content