There are no tracking or monitoring cookies on this site. There are only cookies used for documentation examples related to cookies.
Close

Processing...
This may take a few seconds.

Single page applications

This section refers to websites that are classified as single page applications.

There are 2 types of single page application websites that we can do in Active CSS:

  1. Websites that use fetch/ajax calls to the server after the first page load to load up further content. This is the most common method of building an SPA, so you can find the documentation on the Regular ajax websites page.
  2. Websites that live in a single HTML file and store page content inside template tags and then load up page content from there when needed. This can be found on the Offline interactive websites page.

Both of these can be done in Active CSS from the front-end, using a front-end routing technique. You still need a back-end server of some kind to serve the files, whether they are static or dynamic, from memory or whatever.

A properly working SPA will work with the browser navigation, fully. No matter where you navigate to, the page loads as expected, keeping you fully in the SPA at all times - even after a page refresh. You get a smoother experience, and when they are done right they really do live up to the hype. Your website will feel more like an app.

Interestingly, you don't have to get very complicated to go full SPA. You don't even need to make your whole site SPA - just the pages you want.