Skip to content

gulp插件,给HTML中的静态资源url加随机参数以突破缓存

License

Notifications You must be signed in to change notification settings

miclay/gulp-anti-cache

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

gulp-anti-cache

Using query strings to negate the effect of chche.

Installation

$ npm install gulp-anti-cache --save-dev

Usage

var gulp = require('gulp');
var nocache = require('gulp-anti-cache');

default usage:

gulp.task('nocache', function() {
  gulp.src('src/*.html')
    .pipe(nocache())
    .pipe(gulp.dest('dest/'));
});

with params usage:

gulp.task('nocache', function() {
  gulp.src('src/*.html')
    .pipe(nocache({
    	stampKeyName: 'customkey'
    }))
    .pipe(gulp.dest('dest/'));
});

About

gulp插件,给HTML中的静态资源url加随机参数以突破缓存

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published