Browser Runtime & Static Files
On this page 5 sections
Runtime assets and local static files
Core serves two separate kinds of files: exact packaged runtime endpoints on registered origins, and configured local static files for unregistered hosts. Neither requires a JavaScript backend.
GET / HEAD packaged runtime endpoints
Authentication: none. Host: a registered origin. Query strings do not change the selected runtime file. These paths are served directly by Core; keep them routed through QSCS at your public proxy.
| Path | Content-Type | Purpose |
|---|---|---|
/.qscs/browser/config.json | application/json | Current origin navigation policy: {"enabled":true,"version":1} or enabled:false. |
/.qscs/browser/loader.js | application/javascript | Navigation worker registration. |
/.qscs/browser/navigation-worker.js | application/javascript | Document navigation and reconstruction; emits Service-Worker-Allowed: /. |
/.qscs/browser/qscs-substrate.wasm | application/wasm | Matching packaged WebAssembly runtime. |
/.qscs/helpers/client.js | application/javascript | Browser facade exposing qscs.ready, fetch, subscribe and createSession. |
/.qscs/helpers/identity.js | application/javascript | Browser identity implementation. |
/.qscs/helpers/session.mjs | application/javascript | Browser session lifecycle controller. |
/.qscs/helpers/api-delta.mjs | application/javascript | Browser API delta reconstruction. |
/.qscs/helpers/api-stream.mjs | application/javascript | Signed browser API streams. |
Success returns HTTP 200, Cache-Control: no-store and X-Content-Type-Options: nosniff. HEAD returns headers without the file body. A recognised runtime file missing from the installation returns an empty HTTP 503 with no-store. Unknown paths are not a file-directory API; they continue through normal origin routing.
The apt package installs helpers under /opt/qscs/helpers. Eligible HTML receives the client automatically when Browser navigation is enabled. No source snapshot or separate file download is required. See Browser Substrate & WASM Bootstrap for configuration and CSP.
Shell / curl
curl -i 'https://app.example.com/.qscs/browser/config.json'
curl -I 'https://app.example.com/.qscs/helpers/client.js'
Local static resolution
Set [Static Pages] Path in qscs.conf and distribute files to each serving node. For a GET whose Host is not a configured origin, lookup uses <Path>/<Host>/<URI>.
| Request target | Relative file |
|---|---|
/ | <host>/index.html |
/about | <host>/about.html |
/about/ | <host>/about/.html |
/assets/app.js | <host>/assets/app.js |
A last component without an extension gains .html. The current unregistered-host resolver receives the URI including its query; use query-free URLs for predictable file mapping. If no file matches, Core tries the bootstrap cache, then returns 200 text/plain with body ok. It does not return a missing-file 404 on that fallback path.
Registered origins retain their origin/cache routing. A matching local file can mark a GET/HEAD path public at the identity gate, but does not override the origin’s content or create an outage copy. That gate lookup uses the path without the query.
Path and access rules
The resolver accepts hostname letters, digits, dots and hyphens; rejects literal null bytes and ..; requires a regular file; and checks the canonical result stays under the configured static root. Keep that directory limited to public files. Do not use a matching static file to exempt a private API path from authentication.
Local-file MIME mapping
| Extension | Content-Type |
|---|---|
| .html, .htm | text/html; charset=utf-8 |
| .json | application/json |
| .css | text/css |
| .js | application/javascript |
| Other extensions | text/plain; charset=utf-8 |
Use the origin or an appropriately configured static server for other MIME types. The packaged runtime routes use their explicit MIME mappings above, including application/wasm and JavaScript for .mjs.