Skip to content

Split Loading for Faster Performance

Last updated: March 18, 20264 min readIntermediateBrandDeveloper

Split loading separates the critical consent logic from the UI rendering, reducing initial load time by up to 60%. This is especially important for MENA markets with variable connectivity.

Why Split Loading

  • Loader (~3KB) handles consent defaults and GCM signals immediately
  • UI bundle loads asynchronously after critical path
  • Better Core Web Vitals scores
  • Faster time-to-interactive for consent decisions
1

Replace the script tag

Swap widget-v2.js for widget-loader.js in your embed code.

2

Verify loading behavior

The loader handles consent cookies and GCM defaults first, then loads the UI.

javascript
<!-- Split loading (recommended for MENA markets) -->
<script src="https://cdn.arqam360.com/widget-loader.js" data-key="YOUR_API_KEY"></script>

<!-- The loader automatically fetches widget-ui.js -->
Split loading is fully backwards-compatible. Existing widget-v2.js embed codes continue to work. You can migrate at any time without losing consent data.

Was this article helpful?