Web Files 

What are Web Files?

Most web applications contain at least some static web resources, such as CSS and Javascript files, images, fonts, and templates. Traditionally, these static web resources are stored in the web application's WEB-INF directory. With Hippo's Web Files feature such static resources can be stored in a so-called web file bundle inside the content repository. This makes the resources less static because they can be replaced without redeployment of the web application.

Web files bundles are served from the content repository but developed on the local file system. In a development environment, web files modified on the file system are automatically imported into the repository. In a production environment web files can either be bootstrapped into the repository during deployment, or manually replaced without the need for redeployment.

Advantages of Web Files

  • Faster web development cycle without requiring external hot-deployment agents such as JRebel.
  • Editing of web resources such as Freemarker templates directly on file system using your favorite IDE with automatic synchronization to the repository.
  • No need for a full redeployment to bring changes in web resources to production.
  • Automatic cache busting of static web resources when they change. The cache busting is done by a prefix change in the URL. This has the extra advantage that static web resources served from a certain URL are immutable and can thus get cache headers to indicate browsers they do not need to refetch them ever.
  • Switch Template support in Channel Manager which works seamlessly with enterprise Relevance and Experiments.
  • Planned support for repository versioned web files and channel preview of new web files.

Documentation

What Web Files are not meant for

Web files should not be used to serve binary content like PDF's or large images. Binary content must be stored in the assets or gallery or embedded in documents if they require workflow. Web Files are a replacement for static resources traditionally stored inside the web application. Also see Web Files Best Practices.

Web Files CDN support

For web files, there is seamless Content Delivery Network (CDN) integration combined with anti-caching in case a web file changes. To configure web files being served from a CDN, see Serving from a CDN.