Live pages
A live page is a saved embedded browser session. Use live pages when you need a real webpage in HarborClient — for example to inspect a site, drive a login flow in a guest browser, inject page scripts, or keep a home URL handy next to your collections.
Live pages appear in the sidebar Live pages section (below Archive). They are separate from collections, from live servers (local HTTP/HTTPS origins for a folder on disk), and from request-script or plugin control of browser tabs via hc.livePage.
Sidebar
The Live pages section lists every saved live page. When the list is empty, HarborClient shows No live pages.
| Action | How |
|---|---|
| New live page | Section header + control — opens a new embedded browser tab at about:blank |
| Open | Click a live page name — opens or focuses the linked browser tab |
| Edit | Row menu → Edit — opens the live page and its Live Page Settings |
| Copy ID | Row menu → Copy ID — copies the portable UUID |
| Export | Row menu → Export — saves a HarborClient website JSON envelope |
| Delete | Row menu → Delete — moves the live page to Trash |
You can also open an unsaved browser tab from the editor (for example File → New Browser or similar new-browser flows), then save it as a live page from the browser chrome.
Browser tab
Each open live page uses an embedded browser tab with its own navigation chrome:
| Control | Purpose |
|---|---|
| Back / Forward | Guest history (does not re-apply live page headers or auth) |
| Reload | Reloads via a chrome-driven navigation so headers and auth still apply |
| Home | Navigates to the live page home URL |
| Address bar | Enter a URL and press Enter / Go. Supports {{variable}} substitution |
| Save / Update | Saves a new live page, or updates URL, title, favicon, and scripts on a linked live page |
| Screenshot | Captures the guest viewport or full page as a PNG |
| Settings (gear) | Opens Live Page Settings for this browser tab |
Address bar variables
The address bar resolves variables from the active collection / environment chain and this live page's own variables. When the same key exists in both places, the live page variable wins.
Unresolved {{tokens}} after substitution are rejected — HarborClient will not navigate until every token resolves.
Live Page Settings
Open settings from the browser chrome gear, or from a sidebar row menu → Edit. The page title is Live Page Settings.
Click Save to persist. When the tab is linked to a saved live page, Save writes the live page registry and syncs the open tab and guest. When the tab is not yet saved as a live page, Save updates the open tab and guest only (use the chrome Save control to create the registry entry).
Settings tabs
| Tab | What it configures |
|---|---|
| General | Display name shown in the sidebar |
| Variables | Website-scoped variables for the address bar, settings editors, and hc.request.variables |
| Headers | Headers and optional User-Agent for chrome-driven navigations |
| Authorization | Basic or Bearer auth applied on chrome-driven navigations |
| PreRequest | Sandbox hc.* scripts that run before each chrome-driven navigation |
| PostRequest | Sandbox hc.* scripts that run after the page finishes loading |
| Injection | Plain JavaScript injected into the page main world at document start, DOM ready, or load complete |
General
Set the Name shown in the sidebar and when this live page is selected. Press Enter in the name field to save, or Escape to close without saving.
Variables
Define key/value rows with optional defaults, the same shape as collection variables. Reference them in the address bar with {{key}} syntax.
Live page variables are also available for autocomplete in Headers and Authorization on this settings page. See Variables for general variable concepts; live page keys override collection and environment keys in the browser address bar.
Saved live page variables are seeded into hc.request.variables for PreRequest and PostRequest scripts (merged with the active collection / environment chain, with live page keys winning). Unsaved variable drafts apply after you click Save, the same as unsaved scripts.
var host = hc.request.variables.get("host");
hc.request.url = hc.request.variables.replaceIn("https://{{host}}/dashboard");Headers
Enabled header rows are sent with chrome-driven navigations only:
- Opening / loading the live page
- Address bar Go
- Home
- Reload
In-page link clicks and Back / Forward use the guest's own history and do not re-attach these headers.
Header values support {{variable}} syntax. A dedicated User-Agent field overrides Chromium's default when non-empty. An explicit Authorization header row in this table overrides the Authorization tab.
Authorization
Choose None, Basic, or Bearer (OAuth 2.0 is selectable in the UI but is not applied to guest navigations). Basic and Bearer produce an Authorization header on chrome-driven navigations unless a manual Authorization header is already set on the Headers tab.
PreRequest and PostRequest
These are HarborClient sandbox scripts (the same hc.* API family as collection and request scripts), limited to the main stage for live pages:
- PreRequest runs before each chrome-driven navigation. Use
hc.requestto inspect or change the target URL. Read live-page and collection/environment values withhc.request.variables.get, and useset/clear/replaceInfor ephemeral changes during that navigation. - PostRequest runs after the page finishes loading.
hc.responseexposes page URL, status, and an HTML snapshot when available. The samehc.request.variablesbag is available (seeded again from saved variables for that navigation).
When the browser tab is linked to a saved live page, hc.info.livepageId is that live page's UUID. For unsaved browser tabs it is an empty string. See Request scripts — hc.info for the full metadata surface.
You can mix inline scripts and snippet references. Saved scripts run on navigation; unsaved drafts in the settings form do not until you click Save.
Injection
Injection scripts are plain JavaScript executed in the page main world (not the HarborClient sandbox). Each script has:
| Field | Description |
|---|---|
| Name | Label in the settings list |
| Run at | Document start, DOM ready, or Load complete |
| Enabled | When off, the script is skipped |
| Source | JavaScript source injected into the guest page |
Use injection for page-side probes and DOM tweaks. Use PreRequest / PostRequest when you need HarborClient APIs (hc.request, variables, snippets, and so on).
Save and update
| Path | What is persisted |
|---|---|
| Live Page Settings → Save | Name, variables, headers, User-Agent, auth, pre/post scripts, injection scripts; syncs the open tab and guest. Writes the registry when the tab is linked. |
| Browser chrome Save / Update | Creates a new live page from the tab, or updates URL, home URL, title, favicon, and applied scripts on a linked live page |
Deleting a live page from the sidebar moves it to Trash (same trash flow as other sidebar entities).
Live pages vs hc.livePage / hc.livePages
| Surface | Purpose |
|---|---|
| Live pages (this guide) | Saved sidebar entities with settings, injection, and chrome-driven request defaults |
Request scripts hc.livePage | Open or control embedded browser tabs from pre/post scripts when Allow script live page access is on — see Request scripts — hc.livePage |
Plugins hc.livePage | Same browser control API for plugins with the browser permission — see SDK — renderer data (hc.livePage) |
Plugins hc.livePages | Saved Live Page registry CRUD for plugins with the live-pages permission — see SDK — renderer data (hc.livePages). Does not open or bind a tab. |
See also
- Live servers — serve a local folder over HTTP/HTTPS and open it in a Live Page
- Collections — shared variables, headers, auth, and scripts for HTTP requests
- Request scripts —
hcAPI, includinghc.info.livepageIdandhc.livePage - SDK —
hc.livePages— plugin registry CRUD for saved live pages - Settings — Allow script live page access and script timeout
- Variables —
{{key}}substitution across HarborClient
