[Prototype-core] Re: Suggestion: DOM storage methods to Prototype

2009-09-30 Thread Joran Greef
Thanks for the links will do. Hope it's also helpful to the discussion at hand. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Prototype: Core" group. To post to this group, send email to prototype-core@googlegroups

[Prototype-core] Re: Suggestion: DOM storage methods to Prototype

2009-09-30 Thread kangax
On Sep 30, 5:15 am, Joran Greef wrote: [..] > In other words, setting about 1000 objects to local storage takes > about 3.3 milliseconds in Safari and 2 seconds(!) in Firefox. localStorage is not the most stable component in Firefox, but it's getting there :) I recently filed a ticket related t

[Prototype-core] Re: Suggestion: DOM storage methods to Prototype

2009-09-30 Thread kangax
On Sep 30, 6:00 am, Joran Greef wrote: > Here's another interesting thing in Safari 4 I just found: > > localStorage.clear(); > localStorage.setItem('hello', 'world'); > localStorage.getItem('hello'); // Returns 'world' > localStorage['hello']; // Returns 'world' > localStorage.hello; // Returns

[Prototype-core] Re: Suggestion: DOM storage methods to Prototype

2009-09-30 Thread andris
On Sep 30, 12:19 pm, Joran Greef wrote: > On a side-note, I think local storage will soon become as important to > client-side code as AJAX, and (at least at this stage) it also seems > to suffer from browser incompatibilities. "Never say never". ;) I couldn't agree more. --~--~-~--~

[Prototype-core] Re: Suggestion: DOM storage methods to Prototype

2009-09-30 Thread andris
On Sep 30, 10:05 am, andris wrote: > > Nope. I mean clean-side database storage - > webkit-does-html5-client-side-database-storage/> > > Wow that's cool, I don't use Safari myself so I wasn't aware of that. I tried to implement the openDatabase support (I dind't fi

[Prototype-core] Re: Suggestion: DOM storage methods to Prototype

2009-09-30 Thread Joran Greef
Here's another interesting thing in Safari 4 I just found: localStorage.clear(); localStorage.setItem('hello', 'world'); localStorage.getItem('hello'); // Returns 'world' localStorage['hello']; // Returns 'world' localStorage.hello; // Returns 'world' localStorage.clear(); localStorage.setItem('

[Prototype-core] Re: Suggestion: DOM storage methods to Prototype

2009-09-30 Thread Joran Greef
On a side-note, I think local storage will soon become as important to client-side code as AJAX, and (at least at this stage) it also seems to suffer from browser incompatibilities. "Never say never". ;) --~--~-~--~~~---~--~~ You received this message because you ar

[Prototype-core] Re: Suggestion: DOM storage methods to Prototype

2009-09-30 Thread Joran Greef
This is timely. I've been working with window.localStorage for the past couple months now and initially I wrote a nice and simple wrapper for it that also provides an in-memory cache where clients do not support window.localStorage. I rewrote it a couple times since then and thought I had somethin

[Prototype-core] Re: Suggestion: DOM storage methods to Prototype

2009-09-30 Thread Yaffle
May I ask you about localStorage? I want to update some property, but no space left on device and FireFox throws error "NS_ERROR_FILE_NO_DEVICE_SPACE", so "localStorage[property]" stays unchanged. try{ localStorage[property] = value; //throws "NS_ERROR_FILE_NO_DEVICE_SPACE" }catch(e){ localS

[Prototype-core] Re: Suggestion: DOM storage methods to Prototype

2009-09-30 Thread andris
> I use "small" (40 lines of code) storage class, that uses cookies or > localStorage. I wasn't able to use cookies for two reasons a) Cookies aren't ment for data storing but for token storing, so they provide EXTREMELY limited space. It's hard to push hundreds of kilobytes into cookies. b) My

[Prototype-core] Re: Suggestion: DOM storage methods to Prototype

2009-09-30 Thread andris
> Nope. I mean clean-side database storage - webkit-does-html5-client-side-database-storage/> Wow that's cool, I don't use Safari myself so I wasn't aware of that. --~--~-~--~~~---~--~~ You received this message because you are subscr

[Prototype-core] Re: Suggestion: DOM storage methods to Prototype

2009-09-29 Thread Yaffle
Yes that's is, but Safari and Chrome isn't popular browsers.(depends on site audience) --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Prototype: Core" group. To post to this group, send email to prototype-core@goog

[Prototype-core] Re: Suggestion: DOM storage methods to Prototype

2009-09-29 Thread kangax
On Sep 30, 12:01 am, Yaffle wrote: [...] > database works in webkit, which supports localStorage. Not in Safari 3 and not in any version of Chrome as of now (although, Chrome is working on `localStorage` at the moment - http://code.google.com/p/chromium/issues/detail?id=4360). Both - Safari 3

[Prototype-core] Re: Suggestion: DOM storage methods to Prototype

2009-09-29 Thread Yaffle
I use "small" (40 lines of code) storage class, that uses cookies or localStorage. IMHO, userData and databases not so usefull: IE userData behavior relies on DOM. database works in webkit, which supports localStorage. --~--~-~--~~~---~--~~ You received this messa

[Prototype-core] Re: Suggestion: DOM storage methods to Prototype

2009-09-29 Thread kangax
On Sep 29, 5:48 pm, andris wrote: > Thank you for the replies! > > > Why don't you use database abstraction when available? It would fill > > in those Safari 3 and Chrome gaps. > > Do you mean database abstraction as a server side database? My point > was only to use browser-side for the caching.

[Prototype-core] Re: Suggestion: DOM storage methods to Prototype

2009-09-29 Thread Mark Holton
On Tue, Sep 29, 2009 at 1:37 PM, kangax wrote: > > I can't speak for everyone in the core, but most definitely not. This > is clearly more suited for a standalone "module". > > Actually, you changed my [user] mind. Module makes more sense. Core libs shouldn't get bloated. (but this is good to

[Prototype-core] Re: Suggestion: DOM storage methods to Prototype

2009-09-29 Thread andris
Thank you for the replies! > Why don't you use database abstraction when available? It would fill > in those Safari 3 and Chrome gaps. Do you mean database abstraction as a server side database? My point was only to use browser-side for the caching. > On a side note, I haven't noticed any unit

[Prototype-core] Re: Suggestion: DOM storage methods to Prototype

2009-09-29 Thread kangax
On Sep 29, 10:12 am, andris wrote: > Hi, > > I've implemented a simple library on the top of DOM storage and IE > userData to act as a browser side caching solution called DOMCached > (www.domcached.com). The library acts like a kind of javascript > memcached caching solution - a script can store

[Prototype-core] Re: Suggestion: DOM storage methods to Prototype

2009-09-29 Thread Mark Holton
On Tue, Sep 29, 2009 at 7:12 AM, andris wrote: > > Hi, > > I've implemented a simple library on the top of DOM storage and IE > userData to act as a browser side caching solution called DOMCached > (www.domcached.com). The library acts like a kind of javascript > memcached caching solution - a sc