rails/turbolinks — pull request #204 by meleyal (2013-04-03 11:45:30+00:00)
Title: Clone document.body to avoid tampering with cached pages

I think the current caching implementation is faulty, shouldn't `cacheCurrentPage` store a clone of the `document.body` rather than a reference?

Otherwise it's possible to accidentally tamper with the cached page. I ran into this problem when removing Backbone.Views on `page:change`. Turbolinks was caching the page with the views removed, as the remove was acting on the live `document.body`.