diff --git a/core/includes/ajax.inc b/core/includes/ajax.inc
index a20acd8e9da393f567c778e4ba64ab277d684c97..ede35daf068ea0f61418785a7bc6b005db4564e0 100644
--- a/core/includes/ajax.inc
+++ b/core/includes/ajax.inc
@@ -552,29 +552,6 @@ function ajax_prepare_response($page_callback_result) {
   return $commands;
 }
 
-/**
- * Performs end-of-Ajax-request tasks.
- *
- * This function is the equivalent of drupal_page_footer(), but for Ajax
- * requests.
- *
- * @see drupal_page_footer()
- */
-function ajax_footer() {
-  // Even for Ajax requests, invoke hook_exit() implementations. There may be
-  // modules that need very fast Ajax responses, and therefore, run Ajax
-  // requests with an early bootstrap.
-  if (drupal_get_bootstrap_phase() == DRUPAL_BOOTSTRAP_FULL && (!defined('MAINTENANCE_MODE') || MAINTENANCE_MODE != 'update')) {
-    module_invoke_all('exit');
-  }
-
-  // Commit the user session. See above comment about the possibility of this
-  // function running without session.inc loaded.
-  if (function_exists('drupal_session_commit')) {
-    drupal_session_commit();
-  }
-}
-
 /**
  * Form element processing handler for the #ajax form property.
  *
diff --git a/core/lib/Drupal/Core/EventSubscriber/RequestCloseSubscriber.php b/core/lib/Drupal/Core/EventSubscriber/RequestCloseSubscriber.php
index 9b3ef454b37c77b60216030ac85650c76bb6cd10..6305164e69e8d33d20b691e52edf89a2c2586492 100644
--- a/core/lib/Drupal/Core/EventSubscriber/RequestCloseSubscriber.php
+++ b/core/lib/Drupal/Core/EventSubscriber/RequestCloseSubscriber.php
@@ -21,7 +21,8 @@ class RequestCloseSubscriber implements EventSubscriberInterface {
    *
    * @todo The body of this function has just been copied almost verbatim from
    *   drupal_page_footer(). There's probably a lot in here that needs to get
-   *   removed/changed.
+   *   removed/changed. Also, if possible, do more light-weight shutdowns on
+   *   AJAX requests.
    *
    * @param Symfony\Component\HttpKernel\Event\PostResponseEvent $event
    *   The Event to process.