Use IE userdata behavior as a client-side data storage
来源:互联网 发布:js鼠标点击空白处事件 编辑:程序博客网 时间:2024/05/20 23:06
I described how to use jStore as a client-side persistent storage in my last post. The jStore manage a number of different storage engines, such as gears and flash objects. But they all need additional downloads.
The IE browser has provide a mechanism called userdata behavior to store max 128kb data a page, 1024kb a domain. This is a portion of DHTML that suppoted by IE5 or later. Refer to this article: userData Behavior.
The userdata behavior is much like what cookie does, but it supply a much bigger storage. The data is stored in the C:\Documents and Settings\User Name\UserData\ folder, which will be visible even if you refresh the page or re-open the IE browser. The data will always exist, unless you delete it manually or set the expire date.
Here is an example:
$(function() {var userData = $('#userData')[0];
$('#getData').click(function() {
$('#data').val('');
userData.load('my_user_data_storage');
$('#data').val(userData.getAttribute('data_1'));
});$('#saveData').click(function() {
userData.setAttribute('data_1', $('#data').val());
userData.save('my_user_data_storage');
});
});<div id="userData" style="behavior: url(#default#userData);">
</div>
<input id="data" type="text" />
<input id="getData" type="button" value="Get Data" />
<input id="saveData" type="button" value="Save Data" />
- Use IE userdata behavior as a client-side data storage
- Using XML as a data storage format
- Client-Side Data Storage-O'Reilly 2016(读书笔记): 这本书内容太弱了
- jStore - Persistent storage solution in client-side
- Variable is declared as a storage pointer. Use an explicit "storage" keyword to silence this warning
- Using jQuery with Client-Side Data Binding
- How to use ESP8266 ESP-01 as a SENSOR web client
- Using WinHTTP as a Side-by-side Assembly
- Add A New Row on Client-Side
- Use External Storage Process Big Data(1)
- Use A Data Reader
- Can I (and my authors) still use client-side ...
- How to use GIT on Client side (Through SSH)
- Python的点点滴滴(Use a Python Object as User Data of C Callback)
- Use __doPostBack() As A Bridge
- Use __doPostBack() As A Bridge
- Use __doPostBack() As A Bridge
- Use __doPostBack() As A Bridge
- Multiline strings in JavaScript
- AOP in JavaScript
- jStore - Persistent storage solution in client-side
- 成功必备的要素
- Prototype/Constructor that i have known
- Use IE userdata behavior as a client-side data storage
- Difference between input and button markup
- How to center an image?
- JavaScript tips and tricks - 1
- Config FCKeditor_2.6.4 with FCKeditor.Net_2.6.3
- Convert word or html to wiki syntax
- JavaScript tips and tricks - 2
- JavaScript tips and tricks - 3
- JavaScript tips and tricks - 4