Skip to content

Monitor availability chunks of a Single-Page Application across a CDN

Notifications You must be signed in to change notification settings

boxine/chunk-tester

Repository files navigation

Chunk tester

A Single Page Application (SPA) serves the same (or very similar) HTML for all URLs. The served HTML is just a very minimal page without content, and references JavaScript files.

For performance reasons, the whole JavaScript code of an SPA is usually split into multiple chunks. Upon load, only the minimum necessary chunks are loaded. When the user navigates to a page or view which requires additional chunks, these chunks are loaded only then.

This speeds up initial load times, but introduces a different problem: When a new version of the SPA is deployed, users who had the old information about chunks will load older chunks. This requires that older chunks are still served after a deployment.

This tool performs a long-running test, checking each CDN IP address every minute, and logging:

  1. Which HTML is served by this CDN edge node? Ideally, we would want Edge nodes to serve new HTML pages immediately; after a deployment is done, all new customers should see the new site.
  2. Which JavaScript files referenced in the current or previous versions is available? Just like HTML updates, we would always expect the current JavaScript to be available, but also previous versions.

About

Monitor availability chunks of a Single-Page Application across a CDN

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published