SPA - Single Page Application Considerations

Hello,
I have recently tried using WPT against a SPA (single page application) that is behind some authentication. I can get past the authentication. When I navigate within the site, the page loads bit the test ends before some list data loads. Are there any considerations or techniques that you can recommend I use for SPAs?

You could load a very minimal interface on first initial page load and include some very basics Javascript to load in new functionality as and when required. This will cut down the initial code required to view the application.

If your visitor is going to definitely view a specific image or set of images but they aren’t displayed on page load, you can also use JS & CSS preloading techniques to ensure that you get a snappy view when it does come to viewing those images - just make sure that the pre-loading is done AFTER then app has fully loaded, otherwise your just stalling the initial page view.

The other considerations are mainly to do with the JS scripting itself like don’t do anything stupid like edit DOM elements in a loop (the most efficient way would be to build up the HTML and replace it all in one “block” rather than adjusting things one piece at a time as DOM manipulations are expensive).