uupaa.wmcache.js
v0.1.4
Published
The temporary storage of web assets to boost performance.
Downloads
18
Maintainers
Readme
WMCache.js
Client side temporary storage to boost performance.
Document
Support browsers
- Safari, Mobile Safari (iOS 8+)
- Chrome, Chrome for Android
How to use
Browser
<script src="lib/WMCache.js"></script>
<script>
var allow = ["**/*.png", "**/*.jpg", "**/*.m4a"];
var cache = new WMCache({ allow: allow }, cacheReady, function(err) {
console.log(err.message);
});
function cacheReady(cache) {
cache.getBlobURL(url, function(url, blobURL, mime, size) {
var img = new Image();
img.src = blobURL;
document.body.appendChild(img);
});
}
</script>