Write the session data cookie if it was loaded and has changed.
# File actionpack/lib/action_controller/session/cookie_store.rb, line 109
def close
if defined?(@data) && [email protected]?
updated = marshal(@data)
raise CookieOverflow if updated.size > MAX
write_cookie('value' => updated) unless updated == @original
end
end