Skip to content

vivekCodeJockey/IndexedFileLoader

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 

Repository files navigation

Indexed DB File Loader

This Is A Library For Load Scripts And Styles From Server And It Will Catched In Indexed DB.When You Load Next Time Your Website Scripts And Styles Will Load From Indexed DB

Getting Started

Just Copy IndexedScript.js from dist folder And Add It In Your Project

Prerequisites

It's Just A Plain Vanila JS Library It Will Works In Indexed DB Supported Browsers Only

Installing

1.Just Copy IndexedScript.js from dist folder And Add It In Your Project
2.Include This File In HTML Head
3.Create An JSON File Like below

{
    "fileConfig": {
        "scripts": [
            {
                "key": "jquery-ui",
                "dependent": [
                    "jquery"
                ],
                "filePath": "jquery-ui.min.js",
                "version": 1
            },
            {
                "key": "jquery",
                "dependent": [],
                "filePath": "jquery-3.3.1.js",
                "version": 1
            }
            
        ],
        "styles": [
            {
                "key": "bootstrap",
                "dependent": [],
                "filePath": "bootstrap.css",
                "version": 1
            }
        ]
    }
}

4.Mention This File Path In IndexedScript.js like Below

var IndexedFileLoader = (function () {
    var fileConfigPath = 'indexedLoader.json';

5.Now You Can Load Scripts And Styles
Note
1.In JSON File Key Should Be Unique
2.You Can Enter Dependent By This Key

Built With

  • [vanilla js]
  • [Indexed DB]

Authors

See also the list of contributors who participated in this project.

License

This project is licensed under the MIT License - see the LICENSE.md file for details

Acknowledgments

About

Script And Style Loader Cached In Indexed Db

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • JavaScript 96.6%
  • HTML 3.4%