Skip to content

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.

The Live pages section lists every saved live page. When the list is empty, HarborClient shows No live pages.

ActionHow
New live pageSection header + control — opens a new embedded browser tab at about:blank
OpenClick a live page name — opens or focuses the linked browser tab
EditRow menu → Edit — opens the live page and its Live Page Settings
Copy IDRow menu → Copy ID — copies the portable UUID
ExportRow menu → Export — saves a HarborClient website JSON envelope
DeleteRow 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:

ControlPurpose
Back / ForwardGuest history (does not re-apply live page headers or auth)
ReloadReloads via a chrome-driven navigation so headers and auth still apply
HomeNavigates to the live page home URL
Address barEnter a URL and press Enter / Go. Supports {{variable}} substitution
Save / UpdateSaves a new live page, or updates URL, title, favicon, and scripts on a linked live page
ScreenshotCaptures 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

TabWhat it configures
GeneralDisplay name shown in the sidebar
VariablesWebsite-scoped variables for the address bar, settings editors, and hc.request.variables
HeadersHeaders and optional User-Agent for chrome-driven navigations
AuthorizationBasic or Bearer auth applied on chrome-driven navigations
PreRequestSandbox hc.* scripts that run before each chrome-driven navigation
PostRequestSandbox hc.* scripts that run after the page finishes loading
InjectionPlain 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.

javascript
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.request to inspect or change the target URL. Read live-page and collection/environment values with hc.request.variables.get, and use set / clear / replaceIn for ephemeral changes during that navigation.
  • PostRequest runs after the page finishes loading. hc.response exposes page URL, status, and an HTML snapshot when available. The same hc.request.variables bag 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:

FieldDescription
NameLabel in the settings list
Run atDocument start, DOM ready, or Load complete
EnabledWhen off, the script is skipped
SourceJavaScript 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

PathWhat is persisted
Live Page Settings → SaveName, 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 / UpdateCreates 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

SurfacePurpose
Live pages (this guide)Saved sidebar entities with settings, injection, and chrome-driven request defaults
Request scripts hc.livePageOpen or control embedded browser tabs from pre/post scripts when Allow script live page access is on — see Request scripts — hc.livePage
Plugins hc.livePageSame browser control API for plugins with the browser permission — see SDK — renderer data (hc.livePage)
Plugins hc.livePagesSaved 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