[thelist] Very nice trick to save bandwidth.

Ryan Finley RyanF at SonicFoundry.com
Fri Jun 8 13:33:52 CDT 2001

At my day job, I work on www.acidplanet.com for Sonic Foundry.

Recently, I tried a new trick on the front page of our "Lounge".

Compare the sizes of the following:



Using javascipt to render the repeating tables client-side has made quite
the difference!

This is a nice tip...

<tip type="javascript">
If you have repeating elements in a page (such as rows in a table), consider
mading the repeating element into a function, and then calling that function
repeatably from client-side script.  Simply pass the unique elements as
parameters to your function.

If you have a lot of repeating elements, you will save a TON of bandwidth.




function tr(param1, param2) {
document.write("<tr>" + param1 + "..." + param2 + "</tr>");

tr(param1, param2);


	Ryan Finley
	President - SurveyMonkey.com (http://www.surveymonkey.com)

More information about the thelist mailing list