storage from YUI

cross browser implementation,留待后续完善