I’m working on a project where I need to prevent browser caching issues for CSS, JavaScript, and image files by adding version query strings (e.g., style.css?ver=221234, images.png?ver=332223). This is a common practice to ensure users always load the latest version of assets after updates, especially when publishing to a live server.
Currently, Bootstrap Studio doesn’t seem to offer a built-in feature to automatically generate or manage version numbers for asset files during the publishing process. I’d like to suggest or request the following enhancements:
**1. Automatic Versioning for Published Files**
- Add an option to automatically append a version query string (e.g., ?ver=[timestamp] or ?ver=[build_number]) to CSS, JS, and image files when publishing a project.
- Allow customization of the version format (e.g., timestamp, incremental build number, or manual input).
**2. Cache-Busting Integration**
- Include a setting in the "Publish" or "Settings" panel to enable cache-busting for all asset files. This could generate unique URLs for each publish (e.g., style.css?ver=20250221-123456 based on the publication date and time).
- Optionally, integrate with version control systems (like Git) to use commit hashes or version tags as the version number.
**3. User Interface Improvement**
- Add a section in the "Publish" or "Settings" panel where users can enable/disable versioning and configure the version format.
- Provide a preview of how the file URLs will look after publishing.
**Use Case**
For example, after publishing my project, I want the HTML output to automatically include links like:
<link rel="stylesheet" href="style.min.css?ver=221234">
<script src="script.min.js?ver=332223">
This would help ensure that users always load the latest assets without manually editing files or relying on external build tools.
**Benefits**
- Simplifies the workflow for developers who need cache-busting functionality.
- Reduces the need for external tools or manual file modifications.
- Improves user experience by ensuring consistent loading of updated assets.
**Additional Notes**
I understand that Bootstrap Studio is primarily a visual design tool, but adding this feature would make it even more powerful for web developers, especially those managing larger projects or frequent updates. If this feature already exists and I’ve missed it, I’d appreciate guidance on how to use it!
Thank you for considering this request, and I look forward to hearing your thoughts or any existing workarounds from the community.
The parameter exists in Export Settings.
Version Assets parameter.
2 Likes