HTML 5 localstorage [英] HTML 5 localstorage

查看:100
本文介绍了HTML 5 localstorage的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在寻找一种方法来存储几乎所有的JS& localstorage中的CSS。我知道如何使用CSS(似乎没有任何障碍)。但是,如果您尝试存储具有任何HTML调用的JS,则会停止保存到本地存储。理想情况下,我只想创建一个供下载的浏览器的源文件列表。

I am looking for a way to store almost all JS & CSS in localstorage. I know how to do it with CSS (seems to work without a hitch). However, if you try to store JS that has any HTML call like that will stop the saving to the local storage. Ideally I would just like to create a list of source files for the browser to download.

为了让您了解我正在尝试将Jquery UI js和Jquery存储在本地存储中。这样他们只需要加载一次。

To give you an idea I am trying to store the Jquery UI js and Jquery in local storage. This way they only need be loaded once.

这样做会大大提高我的申请速度。我已经内置版本控制,以便我可以覆盖任何旧数据。

Doing this will drastically improve the speed of my application. I have already built in version control so that I can overwrite any old data.

还有一件事....只是为了让它变得有趣......一旦所有内容都被下载,我需要回调所以我可以转发用户。 (关于如何做到这一点的任何想法?)

one more thing....just to make it fun...I need a callback once everything has been downloaded so I can forward the user. (any ideas on how to do this?)

感谢所有人的帮助!!!

thanks all for any help!!!

推荐答案

浏览器应该缓存这些资源,因此将它们存储在本地存储中是不值得的。

the browser should cache those resources, so storing them in localstorage isn't worth the headache.

这篇关于HTML 5 localstorage的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆