Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

easymood/Casper

Folders and files

NameName
Last commit message
Last commit date

Latest commit

History

3 Commits

Repository files navigation

Casper 脚本加载器

使用LOCAL STORGE缓存空间,将CSS,JS甚至图片等缓存其中,避免从网络请求资源引起的HTTP请求增高和带宽消耗

####当前功能 使用3种方式从服务器远程获取脚本

1.AJAX

2.IFRAME

3.使用JS插入一个JS脚本,然后通过获取脚本中预设的变量也取得脚本(需要配合构建工具)

4.动画显示,如果首次加载了一个过大的脚本,可以用一个LOADING动画来进行过渡

####计划中的功能 1.使用构建工具自动生成各个脚本的版本号,版本号应该使用MD5字符

####遇到的问题 如果遇到localStorge读取失败或者写入失败,容错方式??

About

精简的脚本加载器,主要作用是将本来需要从网络加载的CSS,脚本,改为从本地存储(localStorge)进行加载

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

Contributors

AltStyle によって変換されたページ (->オリジナル) /