Product
Introducing SSO
Streamline your login process and enhance security by enabling Single Sign-On (SSO) on the Socket platform, now available for all customers on the Enterprise plan, supporting 20+ identity providers.
gulp-css-resource-cache-buster
Advanced tools
Readme
Cache buster for resources specified in CSS files.
This plugin add a query string to the resouce URLs in the CSS. The query string is a MD5 of the resource. So, when the resource got changed, an user agent can not use the cache, because the URL was changed.
You should specify a URL converting table that is a map to URLs in the CSS to the real URLs to the resource. This plugin fetch the resource to get the MD5 if the real URL is a remote URL.
For example:
@font-face {
font-family: 'MyFont';
src: url('local/rel/file.eot') format('eot'),
url('/local/abs/file.woff') format('woff'),
url('/remote/file.ttf') format('truetype');
}
becomes:
@font-face {
font-family: 'MyFont';
src: url('local/rel/file.eot?md5-by-cache-buster=dbbe284acff8af485a7513fc14d8cabd') format('eot'),
url('/local/abs/file.woff?md5-by-cache-buster=1c318b6e722437694bba4bed80aff46f') format('woff'),
url('/remote/file.ttf?md5-by-cache-buster=ee25807e36fcdcdf4ea55311f15e3f66') format('truetype');
}
by the code:
gulp.src('path/to/file.css')
.pipe(cssResourceCacheBuster({
'local/rel/file.eot': './local/rel/file.eot',
'/local/abs/file.woff': './local/abs/file.woff',
'/remote/file.ttf': 'http://example.com/remote/file.ttf'
}))
.pipe(gulp.dest('path/to/modified-file.css'));
npm install --save-dev gulp-css-resource-cache-buster
MIT
FAQs
Cache buster plugin for remote/local resources specified by CSS.
The npm package gulp-css-resource-cache-buster receives a total of 18 weekly downloads. As such, gulp-css-resource-cache-buster popularity was classified as not popular.
We found that gulp-css-resource-cache-buster demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 2 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Product
Streamline your login process and enhance security by enabling Single Sign-On (SSO) on the Socket platform, now available for all customers on the Enterprise plan, supporting 20+ identity providers.
Security News
Tea.xyz, a crypto project aimed at rewarding open source contributions, is once again facing backlash due to an influx of spam packages flooding public package registries.
Security News
As cyber threats become more autonomous, AI-powered defenses are crucial for businesses to stay ahead of attackers who can exploit software vulnerabilities at scale.