Template performance: static files vs hardcoded DOM

chelar4ever

New Member
This question might be theoretical but i think some of the cases it makes sense.I am just wondering about which solution is the most efficient: loading HTML templates or build up them with DOM functions?Both has pros/cons and there's a lot of other factors that can close off any of them: For example it's obvious that DOM-coded HTML can't be as easy to modify than the static one.Fact: there's a zillion factors that can surely affect performance (disk IO, memory, CPU, bad code, etc.).Question: is it a good practice to use DOM-coded HTML (fragments) as templates? Or in this case i'll be fine with string concatenation?Thanks, fabrik
 
Back
Top