Where Are My Files?

With the Webvanta system, much of your content is stored in the database, so there's not the same sort of literal mapping to the file system that you're probably accustomed to for each piece of your site. For example, a template, or a page, is a structure in the database, and not a file on disk (other than when it is cached to improve performance).

Your uploaded documents, such as images, pdf files, and standard JavaScript or CSS files, are regular files and are stored at the root of your site if you don't specify otherwise. If you simply upload a file "picture.jpg", you would access it your code as:


<img src="/picture.jpg">

In the Files control panel, you can easily create folders (directories) and upload files into those folders. If you had picture.jpg in a folder called images, for example, you'd reference it as:


<img src="/images/picture.jpg">

Note that it is important to put a slash at the start of the name. This applies for all references to any kind of file: image, pdf, css, JS, whatever.

If you do not include the leading slash, then the path is relative to the location of the current page, so your images will work fine when you're on a top-level page but not if you're on a page that is in a subdirectory.

The Webvanta system automatically creates renditions in a variety of sizes when you upload an image (see Creating and Accessing Image Renditions). You can create the path to any rendition for any image as follows:

/rendition.rendition_name/path/to/filename.jpg

For example, if you have an image called flower.jpg, and it is in a folder called images, and you want to access a rendition named thumbnail, the path would be /rendition.thumbnail/images/flower.jpg.

Other File Paths

There are two ways to work with CSS and JS files in Webvanta. You can use the editor in the control panel, via Structure > CSS Files and Structure > JS Files, or you can upload CSS or JS files as assets. In either case, the files appear at the root of the site, unless you explicitly upload files to a folder that you create or specify a containing folder for your CSS or JS files.

If you do not change the default setting, a CSS file that you edit through the control panel (under the Structure menu) would be accessed as /stylesheet.css. You can set a containing folder by choosing "Change Folder" from the Actions pop-up menu on the CSS Files page (and similarly on the JS Files page).

If you created a folder in the asset uploader called "styles", and then uploaded stylesheet.css to that folder, the path would be /styles/stylesheet.css.

It is equally important that all other file references use the leading slash, including:

  • References to background images in CSS files
  • References to CSS and JS files in your page templates (or snippets)
  • References to PDF files or other uploaded assets

Shared Webvanta Files

Some standard library files are made available to all sites through the Webvanta CDN (content delivery network). These files include various versions of jQuery, many jQuery plugins, BlueprintCSS, and more. (View the complete List of Files.)

Note: in the past, these files were accessed via the "magic" /webvanta directory, which exists for all sites but is not visible through the file manager. For the moment, this form of file access still works, but it is deprecated and may be slower.

Sidebar: Caching Your Site

There is a transient set of files that you don't work with explicitly, but that dramatically improve the performance of your site, which we mention here for completeness. This is the server cache.

When a page is generated from the database, the request passes through the front-end web server to the application server, which in turn makes requests from the database server. The application server then processes the information from the database to create the page.

We work hard to make this process as quick as we can, but the reality is that many database-driven pages take longer to create than we'd like. So Webvanta has a comprehensive caching system that stores copies of every page delivered. The second time the same page is requested, Webvanta's front-end server recognizes that it already has a snapshot of that page on disk, and it delivers the cached page without making any request to the application server or the database. These cached accesses are just as fast as an equivalent static page.

When you're working on a site, you'll frequently see slower accesses because Webvanta must purge the cache when you change the database. But once you stop modifying it, and the caches get filled up, most visitors will see fast performance.