For more information about userdata, click here.
Again, the project uses ie's userdata. When the user does not use the flash plug-in to store some chat records
Trigger bug? Condition:
1. Use userdata to store two properties xxx in the same xml file. setAttribute ('A', '123'); xxx. setAttribute ('B', '123'); xxx. save ('xmlname ');
In this case, <ROOTSTUB a = "111" B = "222"/>
2. Press ctrl + F5 to refresh the page and delete the known attribute 'a' through xxx. removeAttribute ('A'). Expected results: <ROOTSTUB B = "222"/>
Actual results: <ROOTSTUB/>
Bug? : Another attribute is deleted when a property is deleted.
I guess that userdata may be associated with ie's own cache to some extent during operations. Why is the cache lost after a strong click?
Solution:
When deleting a property, use xxx first. load ('xmlname'); var val = xxx. getAttribute ('B'); load the other property and save it in a variable. After removeAttribute is successful, set setAttribute ('B', val) of attribute B to return.
Thank you for your help.
Ps: how nice it is to use Storage?