Original text: http://www.planabc.net/2008/08/05/userdata_behavior/ The most popular local storage nowadays is the application of cookies, but browsers have many restrictions on cookies. The biggest restriction is the total size of cookies, which is only about 4K (including name, value and equal sign). For more complex applications and requirements, the 4K size is still a bit insignificant. In fact, many browsers (IE, Firefox, Safari) also provide their own local storage functions, which may meet our needs in specific environments. 1. userData behavior Browser support: IE5.0 or above Basic syntax: XML: <Prefix: CustomTag id=sID style=”behavior:url('#default#userData')” /> HTML: <ELEMENT style=”behavior:url('#default#userData')” id=sID> object.style.behavior = "url('#default#userData')" Script: object.addBehavior("#default#userData") Attribute: expires - Sets or gets the expiration date of the data saved by the userData behavior. XMLDocument -- Get a reference to the XML. Method: getAttribute() - Gets the specified attribute value. load(object) – loads the stored object data from the userData storage area. removeAttribute() – Removes the specified attribute from an object. save(object) – stores the object data into a userData store. setAttribute() – Sets the specified attribute value. Remark:
Security Zone Document Limit (KB) Domain Limit (KB) Local achine 128 1024 Intranet 512 10240 Trusted Sites 128 1024 Internet 128 1024 Restricted 64 640 If you set the userData behavior to the html, head, title, or style objects, an error will occur when the save and load methods are called. If you must set it in style, you can set it inline or in the document header, for example: <style> .storeuserData {behavior:url(#default#userData);} </style> The ID is optional for the userData behavior, but will improve performance if included. userData can save data in XML format on the client computer, usually in the C (WIN system disk):\Documents and Settings\XXX\UserData\ folder. The userData data always exists unless it is manually deleted or the expiration date (expires) of the data is set by a script. Mostly translated from: 《userData Behavior》 |
<<: Docker image loading principle
>>: Do you know what are the ways to jump routes in Vue?
User namespace is a new namespace added in Linux ...
background When performing a SQL query, I tried t...
Basic syntax of the table <table>...</tab...
describe: When the Tabs component switches back a...
1. Unzip the file to the current directory Comman...
Prerequisite: Percona 5.6 version, transaction is...
Installation Steps 1. Install Redis Download the ...
1. Let's look at a table creation statement f...
What can Arthas do for you? Arthas is Alibaba'...
First, let's take a look at my basic developm...
How to install and configure mysql-5.7.5-m15-winx...
Installation Environment 1. gcc installation To i...
There are many articles about ssh server configur...
Table of contents Preface environment Install Cre...
Form submission code 1. Source code analysis <...