Improve appending pages to the DOM by using document fragments