Gulp Rev Append

screenshot of Gulp Rev Append

gulp task to cache-busting files using file hash

Overview

Gulp-rev-append is a handy gulp plugin designed to make cache-busting more manageable for web developers by appending a query-string file hash to dependencies specified in HTML files. By utilizing this tool, you can efficiently manage file dependencies such as stylesheets and scripts, ensuring that any changes made to these files are reflected immediately for users. The plugin computes a revision hash based on the file content, providing a straightforward solution for handling cache issues without overly complicated setups.

What sets this plugin apart is its simplicity and effectiveness in resolving caching headaches, particularly for developers working on web-based mobile sites. Instead of modifying entire workflows or relying on complex cache-manifest setups, this tool provides a more streamlined option that integrates easily into your existing gulp tasks.

Features

  • Cache-Busting Mechanism: Appends a query-string hash to specified file dependencies, ensuring browser caches are cleared when files are updated.
  • Regex Flexibility: Uses regex to identify relevant stylesheet and script declarations, making it adaptable to various HTML structures.
  • Content-Based Hashing: The revision hash is calculated based on the contents of the target file, so modifications directly change the hash, enhancing cache management automatically.
  • No Additional Markup Required: Simplifies the process by eliminating the need for complex comments or additional markup to declare dependencies for cache-busting.
  • User-Friendly Setup: Designed for use without the overhead of additional manifest files, making it easy to incorporate into existing workflows.
  • Open Source License: Available under a permissive license, allowing for modification and use by developers without costly restrictions.
  • Custom Tailoring: Created to fit the specific needs of developers looking for a straightforward caching solution without the added complexities of other plugins.
gulp
Gulp

Gulp.js is an old but popular site building tool that automates various repetitive development tasks in web development, such as compiling Sass, minifying JavaScript, and optimizing images.