WebDwarf Tutorials banner
WebDwarf logo

Previewing consists of two stages:
In this tutorial we examine the various preview options available, and other topics relating to previews:

Default browser -- what it is, and how to set it
The Preview files -- where and what they are.
Adding files to the preview folder

Default browser

The basic preview from the hot key F7 or the spyglass button, uses your default browser for the preview -- that is the one that should open if you double-click on an html  or htm file. On a new computer, this will usually be Internet Explorer.

Sometimes after un-installing a browser, nothing happens when you double-click an html file, or Windows will start a dialog asking what program to use to open the file. You can follow this dialog, or open the browser you want and look for the setting that makes this browser the default. E.g.:
Follow the above steps if you want a different default browser to your current one. If a browser other than the four listed above, you will need to search for the equivalent feature that makes it the default.

Other ways of setting a default browser are:
Preview all pages
The Preview files

As explained previously, when you preview a page or project, WebDwarf first generates the html page required then your computer opens the current page in your default browser, or whatever other browser you have set.

The default location for the html pages (preview files) is a temporary folder under your Windows user name. To find your actual location, preview a page then look in your browser address bar to find where the file is located. This will be somewhere like this:
C:\Documents and Settings\YourUserName\Local Settings\Temp\WebDwarf V2\Preview\

In the process, WebDwarf will, if necessary, create a Geometry folder to store any image files it creates.

There are automated clean-up program that will delete temporary folders -- this means your preview files! Generally it won't matter if everything is deleted -- but it does mean that you have to preview your projects again.

This is unlikely to cause a problem if you work on single page projects; however, if you have two or more interlinked projects, or you keep special files in your preview folder, you may wish to disable this automatic deletion.

Do not send these files to your site -- they are purely for local viewing. For files to use on your site, use the Publisher.
Preview all pages
Adding files to the preview folder

Sometimes, you will use special code that requires files (often images) to be in a particular place on your site. Blank link types do this too. Often this will be the root folder  of your site. Or it may be a folder under your root folder, perhaps called images/, not to be confused with the one called image/ used by WebDwarf.

This poses a problem in preview, because unless you make changes to the code or links, previewing will give "file not found" errors. Fortunately, for previewing, the root folder is just the preview folder itself -- the one that contains your html files. So the answer for files that will be in your site's root folder, is to duplicate them in your preview folder.

For other folders under the root folder, say /images, duplicate the images folder in your preview folder, and put any special images you want there. You could use this arrangement for any folders that are at different levels below the root folder of your site.
The idea is to duplicate the folder structure of your site in your preview folder, considering the preview folder as the root folder. Then you can preview normally.

To put something in your preview folder, use Windows Explorer. Then you will be able to create any special folders inside your preview folder, alongside the existing geometry/ folder. Use Windows Explorer to copy the special files into the correct places of your preview folder.

Doing this won't actually create the folders or files on your site -- the only reason is to allow you to preview.

As the preview folder is a temporary folder, it is subject to deletion during cleanup operations. For this reason, only put files there that you can afford to lose.
< Tutorials Home
Virtual Mechanics Logo