diff --git a/core/modules/toolbar/toolbar.js b/core/modules/toolbar/toolbar.js
index ce775de..83afab1 100644
--- a/core/modules/toolbar/toolbar.js
+++ b/core/modules/toolbar/toolbar.js
@@ -1,10 +1,16 @@
-(function ($) {
+(function ($, Drupal) {
 
 "use strict";
 
 Drupal.toolbar = Drupal.toolbar || {};
 
 /**
+ * Store the state of the toolbar.
+ * Default value is not to collapse the toolbar.
+ */
+var toolbarCollapsed = JSON.parse(localStorage.getItem('Drupal.toolbar.collapsed'));
+
+/**
  * Attach toggling behavior and notify the overlay of the toolbar.
  */
 Drupal.behaviors.toolbar = {
@@ -20,78 +26,65 @@ Drupal.behaviors.toolbar = {
       $(window).triggerHandler('resize');
       return false;
     });
-  }
-};
-
-/**
- * Retrieve last saved cookie settings and set up the initial toolbar state.
- */
-Drupal.toolbar.init = function() {
-  // Retrieve the collapsed status from a stored cookie.
-  var collapsed = $.cookie('Drupal.toolbar.collapsed');
 
-  // Expand or collapse the toolbar based on the cookie value.
-  if (collapsed === '1') {
-    Drupal.toolbar.collapse();
-  }
-  else {
-    Drupal.toolbar.expand();
+    // React to localStorage event toggling the toolbar.
+    $(window).bind('storage', function (e) {
+      // Only react to 'Drupal.toolbar.collapsed' value change.
+      if (e.originalEvent.key === 'Drupal.toolbar.collapsed') {
+        // This was changed in another window, get the new value for this window.
+        toolbarCollapsed = JSON.parse(e.originalEvent.newValue);
+        Drupal.toolbar.displayToolbar(toolbarCollapsed);
+      }
+    });
   }
 };
 
 /**
- * Collapse the toolbar.
+ * Set up the initial toolbar state.
  */
-Drupal.toolbar.collapse = function() {
-  var toggle_text = Drupal.t('Show shortcuts');
-  $('#toolbar div.toolbar-drawer').addClass('collapsed');
-  $('#toolbar a.toggle')
-    .removeClass('toggle-active')
-    .attr('title',  toggle_text)
-    .html(toggle_text);
-  $('body').removeClass('toolbar-drawer').css('paddingTop', Drupal.toolbar.height());
-  $.cookie(
-    'Drupal.toolbar.collapsed',
-    1,
-    {
-      path: Drupal.settings.basePath,
-      // The cookie should "never" expire.
-      expires: 36500
-    }
-  );
+Drupal.toolbar.init = function() {
+  Drupal.toolbar.displayToolbar(toolbarCollapsed);
 };
 
 /**
- * Expand the toolbar.
+ * S
+ * @param collapsed
  */
-Drupal.toolbar.expand = function() {
-  var toggle_text = Drupal.t('Hide shortcuts');
-  $('#toolbar div.toolbar-drawer').removeClass('collapsed');
-  $('#toolbar a.toggle')
-    .addClass('toggle-active')
-    .attr('title',  toggle_text)
-    .html(toggle_text);
-  $('body').addClass('toolbar-drawer').css('paddingTop', Drupal.toolbar.height());
-  $.cookie(
-    'Drupal.toolbar.collapsed',
-    0,
-    {
-      path: Drupal.settings.basePath,
-      // The cookie should "never" expire.
-      expires: 36500
-    }
-  );
+Drupal.toolbar.displayToolbar = function(collapsed) {
+  var toggleText;
+  if (collapsed) {
+    toggleText = Drupal.t('Show shortcuts');
+    $('#toolbar div.toolbar-drawer').addClass('collapsed');
+    $('#toolbar a.toggle')
+      .removeClass('toggle-active')
+      .attr('title', toggleText)
+      .html(toggleText);
+    $('body').removeClass('toolbar-drawer').css('paddingTop', Drupal.toolbar.height());
+  }
+  else {
+    toggleText = Drupal.t('Hide shortcuts');
+    $('#toolbar div.toolbar-drawer').removeClass('collapsed');
+    $('#toolbar a.toggle')
+      .addClass('toggle-active')
+      .attr('title', toggleText)
+      .html(toggleText);
+    $('body').addClass('toolbar-drawer').css('paddingTop', Drupal.toolbar.height());
+  }
 };
 
 /**
  * Toggle the toolbar.
  */
 Drupal.toolbar.toggle = function() {
-  if ($('#toolbar div.toolbar-drawer').hasClass('collapsed')) {
-    Drupal.toolbar.expand();
+  toolbarCollapsed = !toolbarCollapsed;
+  this.displayToolbar(toolbarCollapsed);
+  if (toolbarCollapsed) {
+    // Save default override (collapsed toolbar).
+    localStorage.setItem('Drupal.toolbar.collapsed', toolbarCollapsed);
   }
   else {
-    Drupal.toolbar.collapse();
+    // Remove the value from localStorage (expanded toolbar).
+    localStorage.removeItem('Drupal.toolbar.collapsed');
   }
 };
 
@@ -101,4 +94,4 @@ Drupal.toolbar.height = function() {
   return height;
 };
 
-})(jQuery);
+})(jQuery, Drupal);
