Preview
Preview opens your website in a new browser tab, at a private address on your workspace, showing your current saved version exactly as visitors would see it. Drafts are included, and so are your prices and company details. It is never the published version, nothing is saved, and nothing changes for visitors.
!A website open on its Pages view, with the Preview and Publish buttons.
!A website open on its Pages view, with the Preview and Publish buttons, in dark mode.
!A website open on its Pages view, with the Preview and Publish buttons, on a phone.
!A website open on its Pages view, with the Preview and Publish buttons, on a phone in dark mode.
Open the Preview
Choose Preview on the Websites screen (it opens the front page), on a page's row in the list, or in the page builder (it opens that page). A new tab opens at a private preview address. Every link inside the website stays in the preview, so you can click through the whole site, header dropdowns included, and each page is drawn from your saved work the moment you open it.
A bar at the top says Preview, not published, with Publish and Close. Publish asks once, then publishes the ready pages the same way the Websites screen does, and the bar says so when it is done. Close closes the tab.
How Long It Lasts
Each click of Preview makes a new address. It works for 10 minutes from that click, and the first time it is opened is the only time: the address is used up and your tab keeps going on a short session of its own that ends when the 10 minutes do. Opening the same address again, in another tab or another browser, says it was already used. After 10 minutes the preview says it has ended. In both cases, open Preview again from Websites.
Who Can Open It
Only the signed-in person who clicked Preview, and only while they may see websites. Another person of your account, a person of another account, and anyone who is not signed in cannot open it and see nothing of your website. There are no share links. Someone who needs to look at your website should be set up as a user.
What Every Preview Page Does
- It tells search engines to stay away (a noindex line in the page and in its headers), and it is never kept in a public cache.
- It sends no Referer to other websites, and it cannot be shown inside another page.
- It reads only your own account's website, pictures, and brand files.
- It draws the same page as the live website with the same menu script, so dropdowns work.
- Code you added to run on your website (snippets, custom HTML, and chat) does not run in the preview, because the preview lives on your workspace's own address. Forms and published tools show the same placeholders as the page builder. They run on the live website.
For Assistants
The action sites.preview.open (tool websites_preview_address) makes a private preview address for a website, or for one page when you give a path. It works once, for the person the assistant is acting for, and ends 10 minutes after it is made. The address is for a person who is signed in: an assistant cannot open it, and there is no address that opens without a sign in. The answer says so (for is "a signed-in person" and agents_use is websites_page_screenshot). To see a draft, an assistant calls websites_page_screenshot.
sites.preview (tool websites_preview) draws a path of the working copy as text, for the page builder's canvas and for assistants. Give page_id (its id comes from websites_pages) or path (such as /about); with neither it is the front page. The answer comes in parts so it is never too large:
pageslists the website's pages (id,kind,slug,title) starting atoffset(0 at the start), at mostlimitof them (50 at the start, 100 at most).pages_totalis how many there are, andpages_nextis theoffsetto ask for next, or null when there are no more.htmlis the page text,html_charscharacters (60,000 at the start, 120,000 at most) fromhtml_from(0 at the start).html_totalis its whole length, andhtml_nextis thehtml_fromto ask for next, or null at the end.
Example: { site_id: 3, page_id: 96, html_from: 60000 } reads the second part of page 96. It changes nothing.
Behind the Address
The Worker serves /account/preview/site/<key>/<path>. sites.preview.start (the first open) and sites.preview.serve (each page after it) are the Worker's own calls, not screens or assistant tools. The stylesheet is its own file, so it is sent once and not written into every page.
Where to Find It
Websites, then Pages, then Preview on a page's row, or Preview on the Websites screen. It opens in a new browser tab. Anyone who may see websites sees it.