diff --git a/core/lib/Drupal/Core/Update/UpdateKernel.php b/core/lib/Drupal/Core/Update/UpdateKernel.php
index 6c5de73..4005af7 100755
--- a/core/lib/Drupal/Core/Update/UpdateKernel.php
+++ b/core/lib/Drupal/Core/Update/UpdateKernel.php
@@ -29,6 +29,33 @@ class UpdateKernel extends DrupalKernel {
   /**
    * {@inheritdoc}
    */
+  public function discoverServiceProviders() {
+    parent::discoverServiceProviders();
+
+    $this->serviceProviderClasses['app']['update_kernel'] = 'Drupal\Core\Update\UpdateServiceProvider';
+  }
+
+  /**
+   * {@inheritdoc}
+   */
+  protected function initializeContainer() {
+    // Always force a container rebuild.
+    $this->containerNeedsRebuild = TRUE;
+    $container = parent::initializeContainer();
+    return $container;
+  }
+
+  /**
+   * {@inheritdoc}
+   */
+  protected function cacheDrupalContainer(array $container_definition) {
+    // Don't save this particular container to cache.
+    return FALSE;
+  }
+
+  /**
+   * {@inheritdoc}
+   */
   public function handle(Request $request, $type = self::MASTER_REQUEST, $catch = TRUE) {
     try {
       static::bootEnvironment();
diff --git a/core/lib/Drupal/Core/Update/UpdateServiceProvider.php b/core/lib/Drupal/Core/Update/UpdateServiceProvider.php
new file mode 100644
index 0000000..510080a
--- /dev/null
+++ b/core/lib/Drupal/Core/Update/UpdateServiceProvider.php
@@ -0,0 +1,42 @@
+<?php
+
+/**
+ * @file
+ * Contains \Drupal\Core\Update\UpdateServiceProvider.
+ */
+
+namespace Drupal\Core\Update;
+
+use Drupal\Core\DependencyInjection\ContainerBuilder;
+use Drupal\Core\DependencyInjection\ServiceModifierInterface;
+use Drupal\Core\DependencyInjection\ServiceProviderInterface;
+use Symfony\Component\DependencyInjection\Definition;
+use Symfony\Component\DependencyInjection\Reference;
+
+/**
+ * Ensures for some services that they don't cache.
+ */
+class UpdateServiceProvider implements ServiceProviderInterface, ServiceModifierInterface {
+
+  /**
+   * {@inheritdoc}
+   */
+  public function register(ContainerBuilder $container) {
+    $definition = new Definition('Drupal\Core\Cache\NullBackend', ['null']);
+    $container->setDefinition('cache.null', $definition);
+  }
+
+  /**
+   * {@inheritdoc}
+   */
+  public function alter(ContainerBuilder $container) {
+    $definition = $container->getDefinition('asset.resolver');
+    $argument = new Reference('cache.null');
+    $definition->replaceArgument(5, $argument);
+
+    $definition = $container->getDefinition('library.discovery.collector');
+    $argument = new Reference('cache.null');
+    $definition->replaceArgument(0, $argument);
+  }
+
+}
diff --git a/core/modules/system/src/Controller/DbUpdateController.php b/core/modules/system/src/Controller/DbUpdateController.php
index fa8104d..935a067 100644
--- a/core/modules/system/src/Controller/DbUpdateController.php
+++ b/core/modules/system/src/Controller/DbUpdateController.php
@@ -186,6 +186,9 @@ public function handle($op, Request $request) {
     }
     $title = isset($output['#title']) ? $output['#title'] : $this->t('Drupal database update');
 
+    // Ensure that at least the drupalSettings js is loaded.
+    $output['#attached']['library'][] = 'core/drupalSettings';
+
     return $this->bareHtmlPageRenderer->renderBarePage($output, $title, 'maintenance_page', $regions);
   }
 
diff --git a/core/modules/system/src/Tests/Update/UpdatePathTestBase.php b/core/modules/system/src/Tests/Update/UpdatePathTestBase.php
index fc8d4c3..b5e8784 100644
--- a/core/modules/system/src/Tests/Update/UpdatePathTestBase.php
+++ b/core/modules/system/src/Tests/Update/UpdatePathTestBase.php
@@ -243,6 +243,7 @@ protected function runUpdates() {
     ]]]);
 
     $this->drupalGet($this->updateUrl);
+    $this->doPreUpdateTests();
     $this->clickLink(t('Continue'));
 
     // Run the update hooks.
@@ -266,4 +267,12 @@ protected function runUpdates() {
     $this->assertFalse(\Drupal::service('entity.definition_update_manager')->needsUpdates(), 'After all updates ran, entity schema is up to date.');
   }
 
+  /**
+   * Tests update.php before tests are run.
+   */
+  protected function doPreUpdateTests() {
+    // No-op. Tests wishing to do tests at the update.php URL before updates are
+    // run can override this method and implement their required tests.
+  }
+
 }
diff --git a/core/modules/system/src/Tests/Update/UpdatePathTestJavaScriptTest.php b/core/modules/system/src/Tests/Update/UpdatePathTestJavaScriptTest.php
new file mode 100644
index 0000000..0061890
--- /dev/null
+++ b/core/modules/system/src/Tests/Update/UpdatePathTestJavaScriptTest.php
@@ -0,0 +1,57 @@
+<?php
+
+/**
+ * @file
+ * Contains \Drupal\system\Tests\Update\UpdatePathTestJavaScriptTest.php
+ */
+
+namespace Drupal\system\Tests\Update;
+
+/**
+ * Tests the presence of JavaScript at update.php.
+ *
+ * @group Update
+ */
+class UpdatePathTestJavaScriptTest extends UpdatePathTestBase {
+
+  /**
+   * {@inheritdoc}
+   */
+  protected function setDatabaseDumpFiles() {
+    $this->databaseDumpFiles = [
+      __DIR__ . '/../../../tests/fixtures/update/drupal-8.bare.standard.php.gz',
+    ];
+  }
+
+  /**
+   * Test JavaScript loading at update.php.
+   *
+   * @see ::doPreUpdateTests
+   */
+  public function testJavaScriptLoading() {
+    $this->runUpdates();
+  }
+
+  /**
+   * {@inheritdoc}
+   */
+  protected function doPreUpdateTests() {
+    // Ensure that at least one JS script has drupalSettings in there.
+    $scripts = $this->xpath('//script');
+    $found = FALSE;
+    foreach ($scripts as $script) {
+      if (!isset($script['src'])) {
+        continue;
+      }
+      $src = (string) $script['src'];
+      $file_content = file_get_contents($src);
+
+      if (strpos($file_content, 'window.drupalSettings =') !== FALSE) {
+        $found = TRUE;
+      }
+    }
+
+    $this->assertTrue($found, 'Ensure that the drupalSettingsLoader.js was included in the JS files');
+  }
+
+}
