On some of my pages I have βtemplatesβ. For example, I may have a table, and I have a "template" for each row of the table
<div class="wholeRow"><div class="lefCol"></div>...
Then I use JS to populate this table. This is a little silly, although the user has to download this template every time they visit the page - I must be able to cache it.
I'm not sure how to cache it; the only thing I can think of is to put it in a static javascript file and wrap it all with help document.write, but that seems like, well, stupid. Does anyone have any other ideas?
source
share