Skip to content

Bootloader.js is a script and resource loader for caching and loading using localStorage.

Notifications You must be signed in to change notification settings

eskypl/Bootloader.js

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Bootloader.JS

Instalation

npm install bootloader-js --save

and add in

	<script src="./node_modules/bootloader-js/dist/bootloader.min.js"></script>

Configuration

after script bootloader

	<script>
		window.blConfig = {
			prefix: 'BL.',
            lifeTime: 43200000, // default 12 hours
            noRequireWaitTime: 10000, // default 10 sec.
            cookieName: 'firstLoadBL',
            cookieExpires: 43200000, // default 12 hours expires
            iframeUrl: false, // for cross origin localStorage
		};
	</script>

Example

after bootloader script and config

	<style type="text/css" data-hash="{{ hashFile }}" data-require="1" data-url="{{ urlFile }}"></style>

for javascript file add in

	<script type="text/javascript"  data-hash="{{ hashFile }}" data-require="1" data-src="{{ urlFile }}"></script>

About

Bootloader.js is a script and resource loader for caching and loading using localStorage.

Resources

Stars

Watchers

Forks

Packages

No packages published