diff --git a/core/includes/ajax.inc b/core/includes/ajax.inc
index 328f54c..330d887 100644
--- a/core/includes/ajax.inc
+++ b/core/includes/ajax.inc
@@ -47,9 +47,7 @@
  *     function named by #ajax['callback'], which returns the form element that
  *     has been updated and needs to be returned to the browser, or
  *     alternatively, an array of custom Ajax commands.
- *   - The page delivery callback for 'system/ajax', ajax_deliver(), renders the
- *     element returned by #ajax['callback'], and returns the JSON string
- *     created by ajax_render() to the browser.
+ *   - The array is serialized using ajax_render() and sent to the browser.
  *   - The browser unserializes the returned JSON string into an array of
  *     command objects and executes each command, resulting in the old page
  *     content within and including the HTML element specified by
@@ -420,72 +418,6 @@ function ajax_base_page_theme() {
 }
 
 /**
- * Packages and sends the result of a page callback as an Ajax response.
- *
- * This function is the equivalent of drupal_deliver_html_page(), but for Ajax
- * requests. Like that function, it:
- * - Adds needed HTTP headers.
- * - Prints rendered output.
- * - Performs end-of-request tasks.
- *
- * @param $page_callback_result
- *   The result of a page callback. Can be one of:
- *   - NULL: to indicate no content.
- *   - An integer menu status constant: to indicate an error condition.
- *   - A string of HTML content.
- *   - A renderable array of content.
- *
- * @see drupal_deliver_html_page()
- */
-function ajax_deliver($page_callback_result) {
-  // Browsers do not allow JavaScript to read the contents of a user's local
-  // files. To work around that, the jQuery Form plugin submits forms containing
-  // a file input element to an IFRAME, instead of using XHR. Browsers do not
-  // normally expect JSON strings as content within an IFRAME, so the response
-  // must be customized accordingly.
-  // @see http://malsup.com/jquery/form/#file-upload
-  // @see Drupal.ajax.prototype.beforeSend()
-  $iframe_upload = !empty($_POST['ajax_iframe_upload']);
-
-  // Emit a Content-Type HTTP header if none has been added by the page callback
-  // or by a wrapping delivery callback.
-  if (is_null(drupal_get_http_header('Content-Type'))) {
-    if (!$iframe_upload) {
-      // Standard JSON can be returned to a browser's XHR object, and to
-      // non-browser user agents.
-      // @see http://www.ietf.org/rfc/rfc4627.txt?number=4627
-      drupal_add_http_header('Content-Type', 'application/json; charset=utf-8');
-    }
-    else {
-      // Browser IFRAMEs expect HTML. With most other content types, Internet
-      // Explorer presents the user with a download prompt.
-      drupal_add_http_header('Content-Type', 'text/html; charset=utf-8');
-    }
-  }
-
-  // Print the response.
-  $commands = ajax_prepare_response($page_callback_result);
-  $json = ajax_render($commands);
-  if (!$iframe_upload) {
-    // Standard JSON can be returned to a browser's XHR object, and to
-    // non-browser user agents.
-    print $json;
-  }
-  else {
-    // Browser IFRAMEs expect HTML. Browser extensions, such as Linkification
-    // and Skype's Browser Highlighter, convert URLs, phone numbers, etc. into
-    // links. This corrupts the JSON response. Protect the integrity of the
-    // JSON data by making it the value of a textarea.
-    // @see http://malsup.com/jquery/form/#file-upload
-    // @see http://drupal.org/node/1009382
-    print '<textarea>' . $json . '</textarea>';
-  }
-
-  // Perform end-of-request tasks.
-  ajax_footer();
-}
-
-/**
  * Converts the return value of a page callback into an Ajax commands array.
  *
  * @param $page_callback_result
diff --git a/core/includes/bootstrap.inc b/core/includes/bootstrap.inc
index 07c9d67..c2d06c4 100644
--- a/core/includes/bootstrap.inc
+++ b/core/includes/bootstrap.inc
@@ -2550,10 +2550,10 @@ function drupal_maintenance_theme() {
  * If fast 404 pages are enabled, and this is a matching page then print a
  * simple 404 page and exit.
  *
- * This function is called from drupal_deliver_html_page() at the time when a
- * a normal 404 page is generated, but it can also optionally be called directly
- * from settings.php to prevent a Drupal bootstrap on these pages. See
- * documentation in settings.php for the benefits and drawbacks of using this.
+ * This function is called when a normal 404 page is generated, but it can also
+ * optionally be called directly from settings.php to prevent a Drupal
+ * bootstrap on these pages. See documentation in settings.php for the benefits
+ * and drawbacks of using this.
  *
  * Paths to dynamically-generated content, such as image styles, should also be
  * accounted for in this function.
diff --git a/core/includes/common.inc b/core/includes/common.inc
index 0b95dcd..f2a4003 100644
--- a/core/includes/common.inc
+++ b/core/includes/common.inc
@@ -2369,200 +2369,6 @@ function l($text, $path, array $options = array()) {
 }
 
 /**
- * Delivers a page callback result to the browser in the appropriate format.
- *
- * This function is most commonly called by menu_execute_active_handler().
- *
- * When a user requests a page, index.php calls menu_execute_active_handler(),
- * which calls the 'page callback' function registered in hook_menu(). The page
- * callback function can return one of:
- * - NULL: to indicate no content.
- * - An integer menu status constant: to indicate an error condition.
- * - A string of HTML content.
- * - A renderable array of content.
- * Returning a renderable array rather than a string of HTML is preferred,
- * because that provides modules with more flexibility in customizing the final
- * result.
- *
- * When the page callback returns its constructed content to
- * menu_execute_active_handler(), this function gets called. The purpose of
- * this function is to determine the most appropriate 'delivery callback'
- * function to route the content to. The delivery callback function then
- * sends the content to the browser in the needed format. The default delivery
- * callback is drupal_deliver_html_page(), which delivers the content as an HTML
- * page, complete with blocks in addition to the content. This default can be
- * overridden on a per menu router item basis by setting 'delivery callback' in
- * hook_menu() or hook_menu_alter(), and can also be overridden on a per request
- * basis in hook_page_delivery_callback_alter().
- *
- * For example, the same page callback function can be used for an HTML
- * version of the page and an Ajax version of the page. The page callback
- * function just needs to decide what content is to be returned and the
- * delivery callback function will send it as an HTML page or an Ajax
- * response, as appropriate.
- *
- * In order for page callbacks to be reusable in different delivery formats,
- * they should not issue any "print" or "echo" statements, but instead just
- * return content.
- *
- * Also note that this function does not perform access checks. The delivery
- * callback function specified in hook_menu(), hook_menu_alter(), or
- * hook_page_delivery_callback_alter() will be called even if the router item
- * access checks fail. This is intentional (it is needed for JSON and other
- * purposes), but it has security implications. Do not call this function
- * directly unless you understand the security implications, and be careful in
- * writing delivery callbacks, so that they do not violate security. See
- * drupal_deliver_html_page() for an example of a delivery callback that
- * respects security.
- *
- * @param $page_callback_result
- *   The result of a page callback. Can be one of:
- *   - NULL: to indicate no content.
- *   - An integer menu status constant: to indicate an error condition.
- *   - A string of HTML content.
- *   - A renderable array of content.
- * @param $default_delivery_callback
- *   (Optional) If given, it is the name of a delivery function most likely
- *   to be appropriate for the page request as determined by the calling
- *   function (e.g., menu_execute_active_handler()). If not given, it is
- *   determined from the menu router information of the current page.
- *
- * @see menu_execute_active_handler()
- * @see hook_menu()
- * @see hook_menu_alter()
- * @see hook_page_delivery_callback_alter()
- */
-function drupal_deliver_page($page_callback_result, $default_delivery_callback = NULL) {
-  if (!isset($default_delivery_callback) && ($router_item = menu_get_item())) {
-    $default_delivery_callback = $router_item['delivery_callback'];
-  }
-  $delivery_callback = !empty($default_delivery_callback) ? $default_delivery_callback : 'drupal_deliver_html_page';
-  // Give modules a chance to alter the delivery callback used, based on
-  // request-time context (e.g., HTTP request headers).
-  drupal_alter('page_delivery_callback', $delivery_callback);
-  if (function_exists($delivery_callback)) {
-    $delivery_callback($page_callback_result);
-  }
-  else {
-    // If a delivery callback is specified, but doesn't exist as a function,
-    // something is wrong, but don't print anything, since it's not known
-    // what format the response needs to be in.
-    watchdog('delivery callback not found', 'callback %callback not found: %path.', array('%callback' => $delivery_callback, '%path' => current_path()), WATCHDOG_ERROR);
-  }
-}
-
-/**
- * Packages and sends the result of a page callback to the browser as HTML.
- *
- * @param $page_callback_result
- *   The result of a page callback. Can be one of:
- *   - NULL: to indicate no content.
- *   - An integer menu status constant: to indicate an error condition.
- *   - A string of HTML content.
- *   - A renderable array of content.
- *
- * @see drupal_deliver_page()
- */
-function drupal_deliver_html_page($page_callback_result) {
-  // Emit the correct charset HTTP header, but not if the page callback
-  // result is NULL, since that likely indicates that it printed something
-  // in which case, no further headers may be sent, and not if code running
-  // for this page request has already set the content type header.
-  if (isset($page_callback_result) && is_null(drupal_get_http_header('Content-Type'))) {
-    drupal_add_http_header('Content-Type', 'text/html; charset=utf-8');
-  }
-
-  // Send X-UA-Compatible HTTP header to force IE to use the most recent
-  // rendering engine or use Chrome's frame rendering engine if available.
-  if (is_null(drupal_get_http_header('X-UA-Compatible'))) {
-    drupal_add_http_header('X-UA-Compatible', 'IE=edge,chrome=1');
-  }
-
-  drupal_add_http_header('Content-Language', drupal_container()->get(LANGUAGE_TYPE_INTERFACE)->langcode);
-
-  // Menu status constants are integers; page content is a string or array.
-  if (is_int($page_callback_result)) {
-    $site_config = config('system.site');
-    // @todo: Break these up into separate functions?
-    switch ($page_callback_result) {
-      case MENU_NOT_FOUND:
-        // Print a 404 page.
-        drupal_add_http_header('Status', '404 Not Found');
-
-        watchdog('page not found', check_plain(current_path()), NULL, WATCHDOG_WARNING);
-
-        // Check for and return a fast 404 page if configured.
-        drupal_fast_404();
-
-        // Keep old path for reference, and to allow forms to redirect to it.
-        if (!isset($_GET['destination'])) {
-          $_GET['destination'] = current_path();
-        }
-
-        $path = drupal_get_normal_path($site_config->get('page.404'));
-        if ($path && $path != current_path()) {
-          // Custom 404 handler. Set the active item in case there are tabs to
-          // display, or other dependencies on the path.
-          menu_set_active_item($path);
-          $return = menu_execute_active_handler($path, FALSE);
-        }
-
-        if (empty($return) || $return == MENU_NOT_FOUND || $return == MENU_ACCESS_DENIED) {
-          // Standard 404 handler.
-          drupal_set_title(t('Page not found'));
-          $return = t('The requested page "@path" could not be found.', array('@path' => request_uri()));
-        }
-
-        drupal_set_page_content($return);
-        $page = element_info('page');
-        print drupal_render_page($page);
-        break;
-
-      case MENU_ACCESS_DENIED:
-        // Print a 403 page.
-        drupal_add_http_header('Status', '403 Forbidden');
-        watchdog('access denied', check_plain(current_path()), NULL, WATCHDOG_WARNING);
-
-        // Keep old path for reference, and to allow forms to redirect to it.
-        if (!isset($_GET['destination'])) {
-          $_GET['destination'] = current_path();
-        }
-
-        $path = drupal_get_normal_path($site_config->get('page.403'));
-        if ($path && $path != current_path()) {
-          // Custom 403 handler. Set the active item in case there are tabs to
-          // display or other dependencies on the path.
-          menu_set_active_item($path);
-          $return = menu_execute_active_handler($path, FALSE);
-        }
-
-        if (empty($return) || $return == MENU_NOT_FOUND || $return == MENU_ACCESS_DENIED) {
-          // Standard 403 handler.
-          drupal_set_title(t('Access denied'));
-          $return = t('You are not authorized to access this page.');
-        }
-
-        print drupal_render_page($return);
-        break;
-
-      case MENU_SITE_OFFLINE:
-        // Print a 503 page.
-        drupal_maintenance_theme();
-        drupal_add_http_header('Status', '503 Service unavailable');
-        drupal_set_title(t('Site under maintenance'));
-        print theme('maintenance_page', array('content' => filter_xss_admin(variable_get('maintenance_mode_message',
-          t('@site is currently under maintenance. We should be back shortly. Thank you for your patience.', array('@site' => $site_config->get('name')))))));
-        break;
-    }
-  }
-  elseif (isset($page_callback_result)) {
-    // Print anything besides a menu constant, assuming it's not NULL or
-    // undefined.
-    print drupal_render_page($page_callback_result);
-  }
-}
-
-/**
  * Performs end-of-request tasks.
  *
  * There should rarely be a reason to call exit instead of drupal_exit();
diff --git a/core/modules/system/lib/Drupal/system/Tests/Ajax/AjaxTestBase.php b/core/modules/system/lib/Drupal/system/Tests/Ajax/AjaxTestBase.php
index df1da8b..f3bfbe1 100644
--- a/core/modules/system/lib/Drupal/system/Tests/Ajax/AjaxTestBase.php
+++ b/core/modules/system/lib/Drupal/system/Tests/Ajax/AjaxTestBase.php
@@ -24,14 +24,14 @@ class AjaxTestBase extends WebTestBase {
   /**
    * Assert that a command with the required properties exists within the array of Ajax commands returned by the server.
    *
-   * The Ajax framework, via the ajax_deliver() and ajax_render() functions,
-   * returns an array of commands. This array sometimes includes commands
-   * automatically provided by the framework in addition to commands returned by
-   * a particular page callback. During testing, we're usually interested that a
-   * particular command is present, and don't care whether other commands
-   * precede or follow the one we're interested in. Additionally, the command
-   * we're interested in may include additional data that we're not interested
-   * in. Therefore, this function simply asserts that one of the commands in
+   * The Ajax framework, via the ajax_render() function, returns an array of
+   * commands. This array sometimes includes commands automatically provided by
+   * the framework in addition to commands returned by a particular page
+   * callback. During testing, we're usually interested that a particular
+   * command is present, and don't care whether other commands precede or
+   * follow the one we're interested in. Additionally, the command we're
+   * interested in may include additional data that we're not interested in.
+   * Therefore, this function simply asserts that one of the commands in
    * $haystack contains all of the keys and values in $needle. Furthermore, if
    * $needle contains a 'settings' key with an array value, we simply assert
    * that all keys and values within that array are present in the command we're
diff --git a/core/modules/system/system.api.php b/core/modules/system/system.api.php
index 3f9fd17..a741733 100644
--- a/core/modules/system/system.api.php
+++ b/core/modules/system/system.api.php
@@ -3644,51 +3644,6 @@ function hook_date_formats_alter(&$formats) {
 }
 
 /**
- * Alters the delivery callback used to send the result of the page callback to the browser.
- *
- * Called by drupal_deliver_page() to allow modules to alter how the
- * page is delivered to the browser.
- *
- * This hook is intended for altering the delivery callback based on
- * information unrelated to the path of the page accessed. For example,
- * it can be used to set the delivery callback based on a HTTP request
- * header (as shown in the code sample). To specify a delivery callback
- * based on path information, use hook_menu() or hook_menu_alter().
- *
- * This hook can also be used as an API function that can be used to explicitly
- * set the delivery callback from some other function. For example, for a module
- * named MODULE:
- * @code
- * function MODULE_page_delivery_callback_alter(&$callback, $set = FALSE) {
- *   static $stored_callback;
- *   if ($set) {
- *     $stored_callback = $callback;
- *   }
- *   elseif (isset($stored_callback)) {
- *     $callback = $stored_callback;
- *   }
- * }
- * function SOMEWHERE_ELSE() {
- *   $desired_delivery_callback = 'foo';
- *   MODULE_page_delivery_callback_alter($desired_delivery_callback, TRUE);
- * }
- * @endcode
- *
- * @param $callback
- *   The name of a function.
- *
- * @see drupal_deliver_page()
- */
-function hook_page_delivery_callback_alter(&$callback) {
-  // jQuery sets a HTTP_X_REQUESTED_WITH header of 'XMLHttpRequest'.
-  // If a page would normally be delivered as an html page, and it is called
-  // from jQuery, deliver it instead as an Ajax response.
-  if (isset($_SERVER['HTTP_X_REQUESTED_WITH']) && $_SERVER['HTTP_X_REQUESTED_WITH'] == 'XMLHttpRequest' && $callback == 'drupal_deliver_html_page') {
-    $callback = 'ajax_deliver';
-  }
-}
-
-/**
  * Alters theme operation links.
  *
  * @param $theme_groups
diff --git a/core/modules/system/tests/modules/ajax_test/ajax_test.module b/core/modules/system/tests/modules/ajax_test/ajax_test.module
index 27b3161..7da77a6 100644
--- a/core/modules/system/tests/modules/ajax_test/ajax_test.module
+++ b/core/modules/system/tests/modules/ajax_test/ajax_test.module
@@ -40,7 +40,7 @@ function ajax_test_system_theme_info() {
 }
 
 /**
- * Menu callback; Return an element suitable for use by ajax_deliver().
+ * Page callback: Returns an element suitable for use by ajax_render().
  *
  * Additionally ensures that ajax_render() incorporates JavaScript settings
  * generated during the page request by invoking drupal_add_js() with a dummy
