Monday, February 12th, 2007
DOM Storage and Microformats
John Resig has been writing about the bleeding edge features that will hopefully hit us around the Firefox 3 timeframe: DOM Storage and Microformat integration.
DOM Storage
John wanted to delve into DOM Storage and answered some of the questions posed such as:
- What’s to stop a script from filling an entire storage area with random data?
- Storing data to globalStorage[’localdomain’] (intranet global storage baybee)
- What’s with the name “DOM Storage� (It is bad isn't it)
- The storage event
- Server-side Data
Microformats
Michael has already started developing the solid Microformat Parser, with Andy Mitchell, that will go into Firefox 3. And since this is part of the overall Firefox 3 Content Handling Requirements, it's a big priority for inclusion.
So, what could this content-handling API mean for you, the Firefox extension developer? It means that you would be able to write quick-and-dirty JavaScript to handle matched Microformats - and it'd be blazingly fast.
For example, here's some pseudo-code (any final result will, most likely, be very very different):
JAVASCRIPT:
Microformats.addHandler("hcard", function(card){ var img = document.createElement("img"); img.src = "hcard.gif"; img.title = card.data.name + "'s Personal Information"; card.container.appendChild( img ); });
It is fun to hear about the new features. Thanks to John for getting the word out.












DOMStorage[''] — The web copy/paste you’ve been waiting for.
I like working with DOM object.
You also can use DOM to preload images in your application in the following article:
Preloading Images with the DOM