Skip to content

uupaa/WMCache.js

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

22 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

WMCache.js Build Status

npm

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>

About

Client side temporary storage to boost performance.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published