Works for me. (Firefox 2.0.0.3; Firebug 1.04; OS X 10.4.8)
==Libraries:
jQuery 1.1
dojo0.4.1
YUI 0.12.1
MochiKit 1.3.1
Prototype 1.5
Speed test:
(25) Prototype: 2711 ms
(25) MochiKit: 2201 ms
(25) YUI: 1041 ms
(25) dojo: 819 ms
(25) jQuery: 1400 ms
(25) jQuery: 1364 ms
(25) dojo: 1899 ms
(25) YUI: 1053 ms
(25) MochiKit: 2061 ms
(25) Prototype: 2699 ms
It looks like Prototype (v1.5) is the slowest.
==The relevant commetns from the page:
He''s using the HTML 4.0.1 spec: http://www.w3.org/TR/html401/interact/
forms.html#h-17.13
- The reset input should never be serialized. Prototype and MochiKit
get this wrong.
<input type="reset" name="reset" value="NO"
/>
- Submit elements should only appear in the query string when they
are the element used to submit the form. Only jQuery and dojo get
this right. YUI always includes the first submit element. Prototype
sends all the input submit elements (but not button submit elements).
MochiKit sends them all.
<input type="submit" name="sub1" value="NO"
/>
<input type="submit" name="sub2" value="NO"
/>
<input type="image" name="sub3"
src="submit.gif" value="NO" />
<button type="submit" name="sub4"
value="NO">NO</button>
- YUI, Prototype and MochiKit do not support input elements of
type="image".
Each of the libraries tested use JavaScript''s encodeURIComponent[2]
function to encode form data. Technically, this does not conform to
the spec which states the following about the application/x-www-form-
urlencoded content type (emphasis added):
This is the default content type. Forms submitted with this
content type must be encoded as follows:
1. Control names and values are escaped. Space characters are
replaced by `+'', and then reserved characters are escaped as
described in [RFC1738], section 2.2: Non-alphanumeric characters are
replaced by `%HH'', a percent sign and two hexadecimal digits
representing the ASCII code of the character. Line breaks are
represented as "CR LF" pairs (i.e., `%0D%0A'').
2. The control names/values are listed in the order they
appear in the document. The name is separated from the value by `=''
and name/value pairs are separated from each other by ''&''.
While this does not seem to cause any problems, it is interesting and
noteworthy.
</selected quotes>
--------------------------------
I''m not sure I agree with the conclusion that encoding is
noteworthy. Interesting maybe, but not noteworthy.
TAG
On Apr 14, 2007, at 6:11 AM, Christophe Porteneuve wrote:
>
> RobG a écrit :
>> The following link does a comparison of some popular libraries and
>> their ability to correctly serialise a form:
>>
>> <URL: http://www.malsup.com/jquery/form/comp/ >
>>
>> Any comments?
>
> Yes: a JS error ("console.open() is not a function") here
prevents the
> script from completing initialization, and apparently bind behaviors.
> So it''s dead in the water for me...
>
> Interesting effort though, but it would be better if it worked. I use
> Iceweasal 2.0.0.3 with Firebug 1.04...
>
> --
> Christophe Porteneuve a.k.a. TDD
> "[They] did not know it was impossible, so they did it." --Mark
Twain
> Email: tdd-x+CfDp/qHev2eFz/2MeuCQ@public.gmane.org
>
> >
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Ruby on Rails: Spinoffs" group.
To post to this group, send email to
rubyonrails-spinoffs-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
To unsubscribe from this group, send email to
rubyonrails-spinoffs-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
For more options, visit this group at
http://groups.google.com/group/rubyonrails-spinoffs?hl=en
-~----------~----~----~----~------~----~------~--~---