Setup a website
Non SPA Navigation Feature
9 min
overview the non spa navigation feature allows you to disable the default single page application (spa) behavior and force the app to use traditional server navigation instead when spa is set to false, all navigation actions will trigger full page reloads instead of client side routing this feature is available only on leandom why was this feature created? this feature was specifically requested by customers for advertising related requirements some advertising networks and tracking systems work better with traditional page refreshes, as they can properly track page views, refresh ad content, and handle ad impressions more reliably when each navigation triggers a full page reload what is the behavior? default spa behavior (disabled) clicking links or navigating within the app loads new content without refreshing the page faster navigation experience page state is preserved during navigation no spa behavior (enabled) clicking links or navigating triggers a full page reload each navigation request goes to the server similar to traditional websites where every click refreshes the entire page page state is reset with each navigation slower navigation but can be useful for debugging or specific requirements when to use this feature primary use case advertising requirements when customers need better ad tracking, impression counting, or ad refresh functionality that requires full page reloads additional use cases debugging when you need to isolate issues related to client side routing testing to test how the app behaves with traditional server side navigation legacy support when certain functionality requires full page reloads how to disable spa to enable this feature, you need to modify the experience config json file configuration example { "purple" { "leandom" true, "features" { "spa" false } } } configuration options property type default description spa boolean true when false , forces all navigation to use non spa instead of spa routing what to expect when testing ✅ expected behavior when enabled full page reloads every navigation action causes a complete page refresh network requests each navigation generates a new http request to the server loading states you'll see browser loading indicators on each navigation url changes urls still change correctly, but with full page reloads state reset application state is completely reset with each navigation ad refresh advertisements will reload and refresh with each page navigation better ad tracking ad networks can properly count page views and impressions ⚠️ things to watch for performance navigation will be slower compared to spa behavior user experience users may notice the page "flashing" or reloading form data any unsaved form data will be lost during navigation troubleshooting still using spa navigation? the feature includes fallback logic if no spa navigation fails, it will fall back to spa navigation check browser console for any error messages verify the experience config json file is being loaded correctly disabling the feature to return to default spa behavior { "purple" {ssssss "features" { "spa" true } } } or simply remove the spa property entirely from your configuration