Here is another example that a posted a while ago. There a few follow up posts that have more details. You may want to add a .reserve myString.reserve(size) to allocate the space for your web page. Make it a little larger than your expected web page size. This may reduce memory fragmentation from the String operations