1. A method comprising: storing, in a shared memory of a client, a scripting object that retains state information for an original document; and in response to a request to load a new document, cloning the stored scripting object to the new document.