When deploying your site in with target:static all your pages will be generated into HTML and JavaScript files. All calls to APIs will be made and cached in a folder called static inside your generated content so that no calls to your API need to be made on client side navigation.

Step 1: Browser to CDN

When a browser sends the initial request, it will hit the CDN.

Step 3: Browser to Browser

Navigating between pages with is done on the client side so you don’t hit the CDN again and all API calls will be loaded from the already cached static folder even if you hard refresh the browser.

Pages that have been excluded from generation, by using the property will fallback to being a single page application. These pages will therefore not exist in the CDN and will be rendered on client side in the browser once the user navigates to that page.

To learn more about the generate property

Updating your content

In order to get new content to your site from your API you will need to regenerate your site again. With most static sites hosting providers you can do this by pushing your changes to your master branch via the git command or via a pull request.