Wix sites use Multi-Page Application (MPA) architecture to deliver fast, reliable page loading. Understanding how MPA works helps you build site extensions that perform optimally.
Note: MPA architecture is gradually replacing Single-Page Application (SPA) architecture across Wix sites. Build your site extensions for MPA architecture to ensure optimal performance. Extensions optimized for MPA architecture won't affect the performance of sites still using SPA architecture.
MPA is a website architecture in which the browser loads a separate HTML document for each page. When site visitors navigate to different pages on a Wix site, the browser loads a new HTML document for each page, similar to traditional websites.
This differs from SPAs, where only the initial page loads HTML, and subsequent navigation triggers API calls to update content dynamically.
MPA architecture provides several benefits for Wix sites:
When you develop site extensions, keep in mind that each page loads independently. When site visitors navigate between pages, navigation clears any data you store in memory.
Use the session storage API instead of memory storage to maintain data across page navigations. Session storage persists data throughout site visitors' browser sessions, ensuring your extension works seamlessly as site visitors move between pages on a site.