Skip to content
Aymane Taibi edited this page Oct 13, 2016 · 3 revisions

Cache-JS


The localStorage cache for javascript and stylesheet libraries

Using the library is pretty simple

1. The Array object containing the sources

var resources = [ { uri:"some url to the resource", type:"either 'script' or 'style'", name:"a unique name for this library between the others", version:"an indicator for the version", } ];

2. implementing the library

_cache(resources, function(){ //Make this your window.onload alert('Finished Loading :)'); });

Clone this wiki locally