Use the preview
Read the live preview, move between pages, and change the viewport.
On this page
The Preview tab runs your working copy of the site in a real browser frame. It is the site itself, not a screenshot, so links work, forms render and scripts run. It updates as chat makes changes, and none of it reaches your web address until you publish. Only people with access to the project see it, unless you turn on a read-only link, which shows anyone with the link this same preview, unpublished changes included.
Wait for the preview to start
The first time you open a project the preview has to boot. A status pill sits above the frame and names the current step: Resuming preview..., Provisioning preview..., Booting preview... and Syncing your files..., with Creating preview app... first when there is no preview to resume. While AI is applying changes the same pill reads Applying changes..., and while your work is being saved it reads Saving your changes.... A save that fails shows Could not save your changes. for a few seconds. The changes stay in the preview, and the next save that goes through takes them along.
When Modulify restarts the machine your preview runs on, for example to bring it up to date or because it stopped responding, the pill reads Reinitializing preview... first. After an Environment build it reads Moving preview to its new environment... while the preview switches over.
While the editor connects to Modulify the pill reads Connecting to server.... If that connection drops it reads Reconnecting to server... until it is back, or Waiting for your connection... while your device is offline.
If a step fails the pill turns into Could not load your files with a Try again next to it, or Could not load your files, our file partner is having issues while the file partner, the service that stores your site's code, is having trouble. A load of your files that breaks off partway is tried once more on its own before the pill shows this, and sending a chat message while it shows starts the load again too. Partner outages covers how Modulify knows the file partner has trouble and what else can fail meanwhile.
Once the preview is up, the frame loads your site. If the site has not answered after 12 seconds the pill reads Waiting for the site to respond... until the page arrives. A large site can take that long on its first load.
You do not have to do anything when a site stops answering. A site that was answering and then goes quiet for about a minute is restarted by the preview on its own, and one that does not answer right after the preview wakes from sleep is restarted within about 10 seconds. The pill reads Connecting to preview... while it comes back, and the API logs stream gets a Dev server stopped answering line with the reason. A restart for a site that goes quiet in the middle of a session waits until AI has finished working, on a site with several chats until every chat has finished its turn. After three of these restarts in half an hour the preview leaves the site alone, because by then the cause is in the site's own code.
Now and then the dev server keeps running an older copy of your code after a file changes, and a page fails to load even though your files are right. When a page fails on the server inside code that was built from older files than the ones saved, the preview loads the page again a few seconds later. If it still fails there, the preview restarts the site's dev server on its own. The pill reads Refreshing the preview to load your latest changes... while it comes back, and the API logs stream gets a Dev server was running outdated code line naming the files. It does not restart while AI is working on the site, on a site with several chats while any chat is working, and checks again the next time the page fails. It restarts once for each version of those files, so a page that still fails after the restart is failing in the site's own code.
The preview also watches its own memory. When it is about to run out, it restarts the site's dev server with a clean build cache, and the API logs stream gets a Preview is running out of memory line. The first time that happens, Modulify also moves the preview to a bigger machine with 4 GB of memory. It saves your files, restarts the preview on the bigger machine, and the project stays on it from then on. The pill reads Moving preview to a bigger machine... and then goes through the usual start-up steps. If AI is working on the site at that moment, the move waits until it has finished, and on a site with several chats also until no chat holds changes that are not saved yet. While the preview is down in that wait, the pill reads Moving preview to a bigger machine after this chat.... On a site with several chats, a message sent while the preview moves waits in its queue with Waiting while the site finishes a restore or move. and starts by itself once the preview is back on the bigger machine.
A site that runs out of memory even on the bigger machine keeps getting those restarts. If it happens a fourth time within half an hour, the dev server stays off for ten minutes and the pill says how long, for example Preview is out of memory, trying again in 10 minutes.... After that the count starts over. On a site with several chats, restarts that happen while chats are working are counted apart from the site's own, because the chats use memory too. A fourth one within half an hour keeps the dev server off only until the chats have finished, for at most ten minutes, and the pill reads Connecting to preview... until it is back.
The buttons on the address pill stay disabled until the preview is up. Refresh says The preview is still starting while you wait.
Someone watching through a read-only link sees Starting preview... while it boots instead of these steps.
When you step away
If you switch to another tab or minimise the window and leave the editor out of sight for 30 minutes, Modulify pauses the preview and disconnects the editor. The same happens when the editor stays on screen but nobody clicks, types or scrolls in it, or in the preview, for 120 minutes. When you come back the pill at the top of the preview reads Preview paused while you were away, with a Continue button next to it. Press it, or click anywhere or type, for example in the chat, and the editor reconnects and the preview starts back up through the steps above. A chat message you send straight away goes out as soon as the editor is connected again.
Your work is not lost. Pausing only disconnects this browser tab, and saved files stay saved. A chat reply or a publish that is still running holds the pause off, and the clock only starts once it finishes. A read-only link that shows your live preview pauses the same way for the person watching it.
It updates itself
You do not have to press anything to see a change. Once a saved file compiles, the preview hot-reloads and the frame catches up on its own, so Refresh is an escape hatch rather than a step you take after every edit.
When a change from chat touched files and the preview does not hot-reload, Modulify reloads the panel for you about five seconds later. A restored version is covered the same way. The automatic reload leaves a warning in the API logs stream reading Preview did not hot-reload. Refreshed automatically, so a reload you did not ask for always has a record. Logs covers reading that stream.
On a site with several chats, the preview shows the merged site, and on top of it the unfinished changes of one running chat, named by the Live: button on the address bar. Pick another running chat there, or Merged site only, and the preview changes for everyone who has the site open. See The live preview.
You can also tell chat the preview looks stale and it will reload the panel for you. The transcript shows a Refreshing preview step that settles to Refreshed preview, and the API logs stream gets a Preview refreshed line. Chat does this only when you raise it, so a reply that says nothing about refreshing is working as intended.
A reload is not a rebuild. It redraws the frame from the site already running, so it cannot rescue a preview that is blank because the code will not compile. That needs the code itself fixed, which is what chat is for.
Connect a domain from the preview
Once your site has been published, a strip can appear between the toolbar and the frame. It carries a globe, your full https://my-site.modulify.website address, and an orange Connect domain button with a crown.
The strip is only for the person who can act on it, so it shows when you own the workspace that pays for the project, that workspace is on the Free plan, and no custom domain is attached yet or the site's custom domains are paused. Custom domains need a paid plan, so Connect domain opens the plan and credits modal. The strip goes away once the workspace is paying or a domain is connected. See Connect a custom domain.
In the mobile app the strip sits above the preview tools, and Connect domain asks Do you want to continue? and opens the Plans page on the Modulify website in your browser.
Move between pages
The address pill in the centre of the header shows the current path. Click it and a menu opens listing your pages in three groups:
- Static routes, which you can open
- Dynamic routes, which are listed for reference and cannot be opened directly
- Utility routes
Type into the pill to filter that list. If what you type is not one of your pages, a Go to row appears so you can open the path anyway. Press Enter to navigate, Escape to close.
Hover the page tab at the left of the pill and a card shows what that page reports about itself: favicon, title, meta description, tags, and the social preview image. When there is no image it reads No preview image.
You can also just click links inside the page. An internal link navigates the preview, and the address pill follows, so the path updates without you touching the selector. A link pointing anywhere else opens in a new browser tab instead of loading inside the frame, see Links and redirects to other sites. Neither is a fault to chase.
Links and redirects to other sites
The frame only ever shows your own site. When the page tries to take you somewhere else, the frame stays where it was and the other site opens in a new browser tab instead. That covers:
- a link to another site
- a button or script that redirects to another site straight after your click
- a form that sends its answers to another service, which receives them in the new tab
Browsers only let a page open a tab straight after a click. A redirect the page starts on its own, for example while it loads, cannot open one, so the frame stays put and the pill above it reads This page tried to open example.com with an Open button. Press it to open the address in a new tab. The pill goes away once you open it or move to another page.
A route that redirects to another site from the server shows a small page in the frame instead, with the status code, the route and the address it points to. Click the address to open it in a new tab.
A link or redirect to localhost goes to the same path of your preview, so an address written for local development still lands on the right page.
Refresh and viewport
Two controls sit at the right of the address pill.
The circular arrow reloads the frame. Its tooltip is Refresh.
The device icon switches the viewport with each click, from desktop to tablet to mobile and back to desktop. It shows the viewport you are on, and its tooltip names the next one, such as Switch to tablet. Desktop uses the full width, tablet renders at 768px wide and mobile at 375px. The choice is yours alone and does not change the site. Comment pins follow it, since each one shows only in the view it was left in, see Comments.
Switch language
If your site has more than one language, the two-letter code next to the device icon switches which one the preview renders, and the CMS tab follows the same choice. Pick a language from the menu, or click the small cross on the code to go back to the default. When there is only one language the menu reads No other languages and offers Ask AI to add a language, which drops that request into chat for you. Multiple languages covers how a site gains a second language in the first place.
When something breaks
If the page throws at runtime, the frame is replaced by a Runtime error panel that reads Your site hit a runtime error. The Fix with AI button attaches the error to the chat you have open and sends you to the conversation. When no chat is open, it first opens the chat the site came with again and attaches the error there. Under the button sits an Error details toggle, which opens the raw error text with a copy button in the corner. While any chat is working the panel is held back, and it appears a few seconds after the work finishes. On a site where your role is Content editor or Viewer, Fix with AI is disabled with Your role on this site does not include this.
The same panel covers a page that fails on the server rather than in the browser. When nothing more specific was captured it reads The page failed to render on the server.
Some pages cannot host the editing tools. On those you get a small Editing tools unavailable here notice with a Try again, and selecting, commenting and Inspect are unavailable until the connection comes back.
If the frame still ends up on another site, which can happen in an older browser or when a frame embedded in your page sends it there, the pill above it reads This page is outside the site. Back to site loads the last page of your site again, and Refresh does the same. Selecting, commenting and Inspect are unavailable until you are back.
Next
- Select an element targets a specific part of the page in chat.
- Publish a site turns the preview into the live site.