Configure application's default start page

(Couldn’t find this topic in forum archive, but sorry for the dupe if it is already registered.)

Currently, the application’s root URL is the default start page for the application. When the application is ‘open’ in the live preview, the application resets to that default start page / root after each change in the editor… which is inconvenient at times.

My request: could the ‘live preview’ application stay on the current page / path, or could we specify some default start page?

Currently, my solution is to include this snippet in server.js:

app.get("/", function (request, response) {

Unfortunately, that also introduces a redirect from root to /default_start_page.

1 Like

There’s currently no mechanism in place for setting a default page for the live preview. One possible workaround is to open a separate browser page pointing at the page you want and manually refreshing after you make changes. Thanks for the feedback!

Don’t forget to uncheck the “Refresh App on Changes” checkbox!


If you change from

if self.refreshPreviewOnChanges()
  previewWindow?.location = self.currentProject().publishedUrl()


if self.refreshPreviewOnChanges() and previewWindow?
  if previewWindow.location.indexOf(application.currentProject().publishedUrl()) is 0
    previewWindow.location = previewWindow.location
    previewWindow.location = self.currentProject().publishedUrl()

You will be able to refresh the page if it’s on the project’s domain or reset it to the homepage if the user has navigated to a different domain.