Skip to content

Pre-built Release

Download a pre-built modernGraphTool release and host the entire dist/ folder on your own server. This gives you full control over when and which version runs, at the cost of manual updates.

A pre-built release is a self-contained static site. You unzip it, drop your config and data in, and upload the whole folder to your web server. There’s no runtime dependency on jsDelivr, no version-detection magic, and no auto-updates — you control exactly what users see.

Good fit for:

  • Controlled update cadence (you decide when a new version ships)
  • Airgapped, intranet, or otherwise jsDelivr-unreachable environments

Bad fit for:

  • Operators who don’t want to re-upload files on every release
  1. Download the latest release zip.
  2. Extract the zip. The extracted folder is a complete site — everything you need to deploy.
  3. Customize the configuration files:
  4. Upload the entire folder to your web server via FTP or any file-transfer method. That’s it — open the page in a browser and verify it loads.

After extracting the release, you’ll see something like this:

dist/ # (or extracted release folder)
├── config.js # Application settings — YOU EDIT
├── theme.css # Graph color theme — YOU EDIT
├── index.html # HTML entry point — editable for metadata
├── .htaccess # Apache SPA fallback, caching and compression
├── data/
│ ├── phones/ # Measurement data files (.txt) — YOU EDIT
│ ├── target/ # Target curve data files (.txt) — YOU EDIT
│ ├── phone_book.json # Device list definition — YOU EDIT
│ ├── Bounds U.txt # Preference Bound upper (optional) — YOU EDIT
│ └── Bounds D.txt # Preference Bound lower (optional) — YOU EDIT
├── assets/ # Images, strings, etc. — YOU EDIT
└── _app/ # Built application bundle — DO NOT EDIT

Files marked YOU EDIT are safe to customize. The _app/ folder contains the built application and should be left alone — it’s overwritten on every release update.

On Apache, the bundled .htaccess also sets cache lifetimes and turns on compression. Every rule sits inside an <IfModule> guard, so a host without that module simply ignores it, and the SPA fallback is unchanged. A host that is not Apache ignores the whole file. squig.link is one: caching and compression there are squig.link’s own.

  • _app/immutable/ is cached for a year (public, max-age=31536000, immutable). Its file names carry a content hash, so a new release is a new URL.
  • index.html, config.js, theme.css, _app/version.json and data/ are sent with Cache-Control: no-cache. Browsers keep a copy but ask the server first, so an edit you upload shows up on the next load, and an unchanged file costs only a 304.
  • Text types (HTML, CSS, JavaScript, JSON, SVG, WebAssembly) are compressed with Brotli and gzip when mod_brotli / mod_deflate are available.

Other servers need the same three things. The paths are relative to the folder you deploy:

PathCache-Control
_app/immutable/*public, max-age=31536000, immutable
index.html, config.js, theme.css, _app/version.json, data/*no-cache

For nginx, inside the server block of a site served from root:

gzip on;
gzip_types text/css text/plain application/javascript application/json image/svg+xml application/wasm;
location /_app/immutable/ {
add_header Cache-Control "public, max-age=31536000, immutable";
}
location ~ ^/(index\.html|config\.js|theme\.css|_app/version\.json)$ {
add_header Cache-Control "no-cache";
}
location /data/ {
add_header Cache-Control "no-cache";
}
location / {
try_files $uri $uri/ /index.html;
}

On a static host with a headers file (Netlify, Cloudflare Pages), the equivalent _headers file is:

/_app/immutable/*
Cache-Control: public, max-age=31536000, immutable
/index.html
Cache-Control: no-cache
/config.js
Cache-Control: no-cache
/theme.css
Cache-Control: no-cache
/data/*
Cache-Control: no-cache

Those hosts already compress text responses. GitHub Pages sets its own short cache lifetime and cannot be changed.

Pre-built releases need manual updates. The safe procedure:

  1. Back up your current deployment. Keep a copy of config.js, theme.css, data/, assets/, and any customized index.html.
  2. Download the new release from the releases page and extract it.
  3. Copy your customized files back in:
    • config.js
    • theme.css
    • data/ (entire folder — phones, targets, phone_book.json, bounds)
    • assets/ (entire folder)
    • index.html — only if you’ve customized it (OG tags, analytics, etc.). Otherwise use the new release’s index.html so you pick up any upstream improvements.
  4. Upload the merged folder to your server, overwriting the old deployment.
  5. Check the changelog for any config schema changes that need your attention.

The release’s .htaccess also carries a recommended Content-Security-Policy and three other security headers, switched off. See Security Headers for what they do and how to switch them on. If you do, take the new Content-Security-Policy line from each release when you update: it is written for that release.

Data doesn’t appear in the device selector

Section titled “Data doesn’t appear in the device selector”

Cause: PATH configuration in config.js doesn’t match your actual folder layout, or phone_book.json is missing / malformed.

Fix: Verify the paths in PATH (PHONE_MEASUREMENT, TARGET_MEASUREMENT, PHONE_BOOK) point at real files. Open the browser’s network tab and check which request is 404ing. See Managing Data for the expected layout.

Cause: Case sensitivity. Windows and macOS filesystems are case-insensitive by default; most Linux web servers are not. A file named Harman IE 2019v2.txt on disk won’t match a request for harman ie 2019v2.txt.

Fix: Match your filenames exactly to the phone_book.json entries, including case.

Cause: Bounds U.txt and Bounds D.txt aren’t in data/.

Fix: Place both files directly in data/ (not in a subfolder). See the Preference Bound feature doc for the file format.