Re:Javascript and CSS best practices for better performance
by geuis on Tuesday June 15, 2010 @12:56PM
(#1433225)
#1 is completely wrong. Use of document fragments is much faster than innerHTML. This way your dom operations occur in memory and the results are pushed to the dom in one operation. Most of the rest of the tips are valid.
[ Parent
| on HN ]
Re:Javascript and CSS best practices for better performance
by webuiarchitect on Tuesday June 15, 2010 @01:30PM
(#1433297)
No Geuis. Setting innerHTML works faster than DOM methods. Please test.
Re:Javascript and CSS best practices for better performance
by daleharvey on Tuesday June 15, 2010 @01:32PM
(#1433303)
it isnt completely wrong, just slightly confusing. I am guessing he means using innerHTML over working on live dom nodes which are very expensive. documentfragments should definitely be worth mentioning though.