Internet explorer: official userData behavior status?

I am having problems with userData in IE9, which I use when an IE version that does not support spec web storage is encountered.

In particular, the values ​​are not saved when the .save () function is executed (in fact, the C:\Users\USERNAME\AppData\Roaming\Microsoft\Internet Explorer\UserData folder does not have the userData> folder, and is not created when .save ( )).

I did some research and consensus, from a few comments on different sites, is that it seems to be disabled in IE9.

Is there any official expression expressing this? If so, is there a way to check if this version of IE supports it (without a browser)?

+4
source share
1 answer

After some research, I seem to have (for the most part) found the answers to my questions.

Is there some kind of official application expressing this ("this" means that userData is no longer supported in IE9)?

Since I could not find an official statement confirming that this particular behavior was discontinued in IE9, comments and complaints over the network should be sufficient: userData behavior is not supported in IE9. In addition, behavior and HTC are supported in IE10 .

Is there a way to check if this version of IE supports (userData behavior) (without sniffing the browser)?

For IE10 and the earliest versions of IE that do not support userData, you can check for the existence of the addBehavior() member addBehavior() for the element to which the behavior was bound:

 //Assuming "element" has had the userData behavior associated with it through CSS if(element.addBehavior) 

IE9 handling is a bit more complicated, as methods related to userData behavior are present and do not throw exceptions when used correctly.

Fortunately, we can use the relationship between the data storage engine and the XMLDocument member that receives each element with userData behavior. Since this particular member represents the file that will be stored on disk when save() is element.XMLDocument.xml , element.XMLDocument.xml must be updated every time element.addAttribute(key, value) called. If this is not the case, we can assume that userData is not supported:

 //Assuming "element" has had the userData behavior associated with it through CSS if(element.addBehavior) { element.addAttribute("test", ""); //If the to-be-saved XML was updated with the attribute we just added if(element.XMLDocument.xml.indexOf("test") !== -1) { //userData behavior is supported } else { //userData behavior is not supported } } 

An official expression from MS confirming this decline in support will continue to be appreciated, as well as a method for determining full support for userData behavior without adding a dummy type attribute. If you come across any of them, feel free to post them.

+6
source

Source: https://habr.com/ru/post/1447334/


All Articles