W3C home > Mailing lists > Public > public-html-comments@w3.org > August 2012

Re: Datalist pollute the DOM

From: Jason H <scorp1us@yahoo.com>
Date: Thu, 30 Aug 2012 07:43:21 -0700 (PDT)
Message-ID: <1346337801.66601.YahooMailNeo@web120704.mail.ne1.yahoo.com>
To: "Fred ." <eldmannen@gmail.com>, "public-html-comments@w3.org" <public-html-comments@w3.org>
1. Enable gzip transfer encoding.
2. Use AJAX and send a JSON request for the list you want, formatted as a string. Tthen just break it apart and programmatically add the items to the list. 




________________________________
 From: Fred . <eldmannen@gmail.com>
To: public-html-comments@w3.org 
Sent: Thursday, August 30, 2012 10:28 AM
Subject: Datalist pollute the DOM
 
So I have to do <option>Foo</option>
Repeat that 1000 times, and I have massively polluted my DOM with elements.
Also I want transfer Foo which is 3 bytes, but then I have to transfer
opening and closing tags and that takes lots of bandwidth when you
multiply that by 1000.

You should be able make the client fetch the datalist from the server.
And the server send a CSV or something "Alice,Bob,Clare,Dave,Eve,..."
Received on Thursday, 30 August 2012 14:43:53 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Thursday, 30 August 2012 14:43:53 GMT