File: examples/demo1.html

Recommend this page to a friend!
  Classes of Thomas Björk  >  JS and CSS Resource Loader  >  examples/demo1.html  >  Download  
File: examples/demo1.html
Role: Example script
Content type: text/plain
Description: Documentation
Class: JS and CSS Resource Loader
Load cached JavaScript and CSS from localStorage
Author: By
Last change:
Date: 7 years ago
Size: 536 bytes


Class file image Download
<!DOCTYPE html>
    <title>ScriptLoader Demo 1</title>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <script src="../resourceloader.js"></script>
      window.resourceLoader.load("dummies/script1.js", {cache: true, cacheTimeout: 10, complete: function(options) {
        alert('Loaded this script: '+options.src);