[Prototype-core] Re: Suggestion: DOM storage methods to Prototype
Nope. I mean clean-side database storage - http://webkit.org/blog/126/ 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 subscribed to the Google Groups Prototype: Core group. To post to this group, send email to prototype-core@googlegroups.com To unsubscribe from this group, send email to prototype-core-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/prototype-core?hl=en -~--~~~~--~~--~--~---
[Prototype-core] Re: Suggestion: DOM storage methods to Prototype
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 intention was to use this module with a website with very heavy load - millions of pageviews per day. Storing data in a cookie means that this data is being passed around between the browser and the server with every request made to the server (while loading images, static files, etc.). Every kilobyte of data for one million requests makes about 1 GB of extra traffic. It's not much compared to the overall traffic, but it's stil 1 GB per day. And I would like to store not 1 kB but hundreds of kilobytes data. Without the cookies, data is pulled from the server only when there's actual need, not with every request. --~--~-~--~~~---~--~~ 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.com To unsubscribe from this group, send email to prototype-core-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/prototype-core?hl=en -~--~~~~--~~--~--~---
[Prototype-core] Re: Suggestion: DOM storage methods to Prototype
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){ localStorage.removeItem(property);// also throws NS_ERROR_FILE_NO_DEVICE_SPACE } How to update property or remove it at all? --~--~-~--~~~---~--~~ 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.com To unsubscribe from this group, send email to prototype-core-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/prototype-core?hl=en -~--~~~~--~~--~--~---
[Prototype-core] Re: Suggestion: DOM storage methods to Prototype
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 are subscribed to the Google Groups Prototype: Core group. To post to this group, send email to prototype-core@googlegroups.com To unsubscribe from this group, send email to prototype-core-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/prototype-core?hl=en -~--~~~~--~~--~--~---
[Prototype-core] Re: Suggestion: DOM storage methods to Prototype
On Sep 30, 10:05 am, andris andris.rein...@gmail.com wrote: Nope. I mean clean-side database storage - http://webkit.org/blog/126/ 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 find any documentation though :S) but wasn't very successful. openDatabase queries seem to be asynchronous (I execute the query but the results come a little bit later) and that doesn't fit with with my caching system, which provides the data of the cached items immediatelly after the initialization of the module. With openDatabase the module is still waiting for the results from the database while the initialization is already done and program flow goes on. I'd probably need to redesign the module in order to get it working with the openDatabase support. --~--~-~--~~~---~--~~ 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.com To unsubscribe from this group, send email to prototype-core-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/prototype-core?hl=en -~--~~~~--~~--~--~---
[Prototype-core] Re: Suggestion: DOM storage methods to Prototype
On Sep 30, 12:19 pm, Joran Greef jorangr...@gmail.com 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. --~--~-~--~~~---~--~~ 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.com To unsubscribe from this group, send email to prototype-core-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/prototype-core?hl=en -~--~~~~--~~--~--~---
[Prototype-core] Re: Suggestion: DOM storage methods to Prototype
On Sep 30, 5:15 am, Joran Greef jorangr...@gmail.com 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 to clearing (https:// bugzilla.mozilla.org/show_bug.cgi?id=510234). There's also a minor discrepancy with `key` (https://bugzilla.mozilla.org/show_bug.cgi? id=509241), and few others that you can find on a bugtracker. Please, file a bug. [...] -- kangax --~--~-~--~~~---~--~~ 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.com To unsubscribe from this group, send email to prototype-core-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/prototype-core?hl=en -~--~~~~--~~--~--~---
[Prototype-core] Re: Suggestion: DOM storage methods to Prototype
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.com To unsubscribe from this group, send email to prototype-core-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/prototype-core?hl=en -~--~~~~--~~--~--~---
[Prototype-core] Memory Leak in IE
Hello, I am currently working on an AJAX application (prototype 1.6.1). As usual, it runs very well on Chrome and Firefox but we encounter difficulties, particularly with Internet Explorer 6. After much research, it appears that the problem is related to the memory leak. In fact, i reload only some parts of page. (I keep always the header and footer) so a large part of the memory used is never released. I found a solution partially responsive to my needs but it involves changing the core prototype. Prior to Ajax call, I clean all events on elements will be replaced (like _destroyCache during the unload of window). There may be a cleaner solution but I have not found. My changes here: remove: function (element) ( / / Begin Fix if (element = $ (element)) element.stopObserving (false, true); / / End Fix element.parentNode.removeChild (element); return element; ) stopObserving function (element, eventName, handler) ( element = $ (element); / / Begin Fix if (handler === true) ( for (var i = 0, length = CACHE.length; i length; i + +) if (CACHE [i]. descendantOf CACHE [i]. DescendantOf (element)) ( Event.stopObserving (CACHE [i], eventName); CACHE [i] = undefined; ) CACHE = CACHE.reject (Object.isUndefined); ) / / End Fix ) In view of the evolution of AJAX and implementation of Internet Explorer browsers, I think it may be advisable to incorporate a equivalent system in core of prototype. Regards, Franck --~--~-~--~~~---~--~~ 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.com To unsubscribe from this group, send email to prototype-core-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/prototype-core?hl=en -~--~~~~--~~--~--~---