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:
- 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.
- 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. Obviously 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.
But for regular websites or websites that are built purely with ACSS, HTML and CSS the method described in the following pages is by far the easiest and most logical method to get an app-like experience. Read it carefully and try it out. It really is very logical.