Giter VIP home page Giter VIP logo

bootup.js's Introduction

bootup.js

Cache and load static files from local storage. This makes it easier to manage Javascript and other files for offline use, or just to improve the startup time of your web app.

How to use

Simply instantiate a new BootUp object with an array of files to load.

    new BootUp(files, options);

Where:

  • files: an array of URLs to load,
  • options: an object literal (optional)

Options

success: function(Object BootUp)

A callback for when all files have loaded successfully.

error: function(Object BootUp)

A callback for when at least one file has failed.

loaded: function(Object BootUp, Number downloadedCount, Number fileCount, String path, String data)

This callback will fired after a file has successfully downloaded.

  • downloadedCount returns the number of items that have successfully downloaded so far.
  • fileCount returns the number of files remaining.
  • path is the path of the file.
  • data is the contents of the file.

threads: Number

The maximum number of files to download at the same time. The default is 8.

debug: Boolean

Set to true to have logged console output.

refresh: Boolean

Set to true to delete the local storage cache and redownload everything.

License

This project is licensed under the LGPL, see the LICENSE.TXT file for more information.

bootup.js's People

Contributors

djmc avatar jorik avatar tarkwyn avatar

Watchers

 avatar James Cloos avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.