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.
Overview
Section titled “Overview”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.
When to pick this
Section titled “When to pick this”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
Installation
Section titled “Installation”- Download the latest release zip.
- Extract the zip. The extracted folder is a complete site — everything you need to deploy.
- Customize the configuration files:
config.js— application settings (see Customizing the Page)theme.css— graph color theme (see Customizing Page Styles)data/— measurement data and target curves (see Managing Data)
- 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.
Folder structure
Section titled “Folder structure”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 EDITFiles 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.
Caching and compression
Section titled “Caching and compression”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.jsonanddata/are sent withCache-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 a304.- Text types (HTML, CSS, JavaScript, JSON, SVG, WebAssembly) are compressed with Brotli and gzip when
mod_brotli/mod_deflateare available.
Other servers need the same three things. The paths are relative to the folder you deploy:
| Path | Cache-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-cacheThose hosts already compress text responses. GitHub Pages sets its own short cache lifetime and cannot be changed.
Updating the app
Section titled “Updating the app”Pre-built releases need manual updates. The safe procedure:
- Back up your current deployment. Keep a copy of
config.js,theme.css,data/,assets/, and any customizedindex.html. - Download the new release from the releases page and extract it.
- Copy your customized files back in:
config.jstheme.cssdata/(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’sindex.htmlso you pick up any upstream improvements.
- Upload the merged folder to your server, overwriting the old deployment.
- Check the changelog for any config schema changes that need your attention.
Security headers (optional)
Section titled “Security headers (optional)”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.
Troubleshooting
Section titled “Troubleshooting”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.
Site works locally but not on the server
Section titled “Site works locally but not on the server”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.
Preference Bound doesn’t render
Section titled “Preference Bound doesn’t render”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.