Web Files
Overview
Web files are static web resources—such as CSS, JavaScript, images, fonts, and templates—managed within the Bloomreach Content content repository. Traditionally, these resources are stored in the WEB-INF directory of a web application. With the Web Files feature, you can store static resources in a web file bundle inside the repository. This approach allows you to update resources without redeploying the application.
Web files are developed on the local file system and served from the content repository. In development environments, changes made to web files on disk are automatically synchronized with the repository. In production, you can bootstrap web files into the repository during deployment or update them manually without requiring a redeployment.
When to Use Web Files
Use web files to manage static resources that need to be updated independently of application deployments. This is suitable for CSS, JavaScript, templates, and other static assets that benefit from versioning and repository management.
Advantages
- Accelerate the development cycle without relying on external hot-deployment tools.
- Edit web resources—such as Freemarker templates—directly on the file system using your IDE, with automatic synchronization to the repository.
- Apply changes to web resources in production without a full redeployment.
- Enable automatic cache busting for static resources. When a resource changes, the URL prefix updates, ensuring browsers fetch the latest version. This allows resources to be cached indefinitely by browsers.
- Integrate with Switch Template in Experience Manager, supporting Relevance and Experiments.
- Planned features include repository versioning for web files and channel preview for new web files.
Documentation
- Use Web Files
- Bootstrap Web Files
- Switch Template Support
- Configure Web Files
- Secure Web Files
- Web Files Best Practices
- Web Files Troubleshooting
Limitations
Do not use web files to serve binary content such as PDFs or large images. Store binary assets in the assets or gallery or embed them in documents if workflow is required. Web files are intended as a replacement for static resources traditionally stored within the web application. For more details, see Web Files Best Practices.
CDN Support
Web files support integration with Content Delivery Networks (CDNs), including automatic anti-caching when a web file changes. To configure web files for CDN delivery, refer to Serving from a CDN.