Annotations: Difference between revisions

1,900 bytes added ,  23 August 2005
Line 44: Line 44:


Issues: Namespacing of annotation names
Issues: Namespacing of annotation names
== IE's Implementation ==
IE has persistency for web pages called 'userData': http://216.239.63.104/search?q=cache:msdn.microsoft.com/workshop/author/behaviors/reference/behaviors/userdata.asp&hl=en&lr=&sa=G&strip=1
This information is persisted in the cache along with the web page it was written on. You can also pick other data stores, including favorites, history, and snapsnot (when saved to local machine).
=== Using IE's userData ===
In IE, you need to use DHTML behaviors (http://www.w3.org/TR/becss). Behaviors are not currently supported in Mozilla, but there exists an extension wrapping XBL that supports them: http://dean.edwards.name/moz-behaviors/
In CSS you add "behavior:url('#default#userData')" to the CSS for the elements that you want to persist. This overrides the get/setAttribute functions for that element. You can then call element.save(<store name>) to persist the element under the given tag <store name>.
=== Security ===
IE places limits on the visibility of tags to other web pages in the same directory and over the same protocol (to avoid https leakage). There are also limits placed on the size of the data, both for a given web page and for a given domain name.
IE allows an optional expiration date of stored elements. Since these attributes are stored in the cache/history/favorites, they probably disappear when the corresponding store is deleted. There doesn't seem to be any forced expiration, but given the relatively short lifespan of the cache, it probably doesn't matter.
=== Questions ===
* How is persistence shared across different pages in the same directory? Are the names just magically accessable to other pages?
* Are all tags for the saved object stored, or only the ones you setAttribute on?
* What happens if I set a given attribute from multiple pages with the same name but different values? Is the correct value distributed to all?
202

edits