 
   pageCache[currentStateUrl.absolute] =
     url:                      currentStateUrl.relative,
-    body:                     document.body,
+    body:                     document.body.cloneNode(true),
     title:                    document.title,
     positionY:                window.pageYOffset,
     positionX:                window.pageXOffset,



# The ComponentUrl class converts a basic URL string into an object
# that behaves similarly to document.location.  
#
# If an instance is created from a relative URL, the current document 
# is used to fill in the missing attributes (protocol, host, port).  
class ComponentUrl
  constructor: (@original = document.location.href) ->
    return @original if @original.constructor is ComponentUrl



# The Click class handles clicked links, verifying if Turbolinks should
# take control by inspecting both the event and the link. If it should,
# the page change process is initiated. If not, control is passed back
# to the browser for default functionality.
class Click
  @installHandlerLast: (event) ->
    unless event.defaultPrevented
