diff --git a/config/schema/quicktabs.schema.yml b/config/schema/quicktabs.schema.yml
index 014f9dd..03bdb9e 100644
--- a/config/schema/quicktabs.schema.yml
+++ b/config/schema/quicktabs.schema.yml
@@ -20,6 +20,9 @@ quicktabs.quicktabs_instance.*:
     hide_empty_tabs:
       type: boolean
       label: 'Hide Empty Tabs'
+    remember_last_clicked_tab:
+      type: boolean
+      label: 'Remember last clicked tab'
     default_tab:
       type: integer
       label: 'Default Tab'
diff --git a/js/quicktabs.js b/js/quicktabs.js
index 8da3035..e213618 100644
--- a/js/quicktabs.js
+++ b/js/quicktabs.js
@@ -80,32 +80,38 @@ Drupal.quicktabs.tab = function (el) {
       $(context).find('div.quicktabs-wrapper').once('form-group').each(function () {
         var el = $(this);
 
-        // el.id format: "quicktabs-$name"
-        var qt_name = Drupal.quicktabs.getQTName(el);
-        var $ul = $(el).find('ul.quicktabs-tabs:first');
-
-        // Default cookie options.
-        var cookieOptions = {path: '/'};
-        var cookieName = 'Drupal-quicktabs-active-tab-id-' + qt_name;
-
-        $ul.find('li a').each(function (i, element) {
-          var $link = $(element);
-          $link.data('myTabIndex', i);
-
-          // Click the tab ID if a cookie exists.
-          var $cookieValue = $.cookie(cookieName);
-          if ($cookieValue !== '' && $link.data('myTabIndex') == $cookieValue) {
-            $(element).click();
-          }
-
-          // Set the click handler for all tabs, this updates the cookie on
-          // every tab click.
-          $link.on('click', function () {
-            var $linkdata = $(this);
-            var tabIndex = $linkdata.data('myTabIndex');
-            $.cookie(cookieName, tabIndex, cookieOptions);
+        // only remember last clicked tab if the option is enabled.
+        if($(el).data('rememberLast')){
+
+          // el.id format: "quicktabs-$name"
+          var qt_name = Drupal.quicktabs.getQTName(el);
+          var $ul = $(el).find('ul.quicktabs-tabs:first');
+
+          // Default cookie options.
+          var cookieOptions = {path: '/'};
+          var cookieName = 'Drupal-quicktabs-active-tab-id-' + qt_name;
+
+          $ul.find('li a').each(function (i, element) {
+            var $link = $(element);
+            $link.data('myTabIndex', i);
+
+
+
+            // Click the tab ID if a cookie exists.
+            var $cookieValue = $.cookie(cookieName);
+            if ($cookieValue !== '' && $link.data('myTabIndex') == $cookieValue) {
+              $(element).click();
+            }
+
+            // Set the click handler for all tabs, this updates the cookie on
+            // every tab click.
+            $link.on('click', function () {
+              var $linkdata = $(this);
+              var tabIndex = $linkdata.data('myTabIndex');
+              $.cookie(cookieName, tabIndex, cookieOptions);
+            });
           });
-        });
+        }
       });
     }
   };
diff --git a/src/Entity/QuickTabsInstance.php b/src/Entity/QuickTabsInstance.php
index 4460574..59d00ca 100644
--- a/src/Entity/QuickTabsInstance.php
+++ b/src/Entity/QuickTabsInstance.php
@@ -39,6 +39,7 @@ use Drupal\Core\Config\Entity\ConfigEntityBase;
  *     "renderer" = "renderer",
  *     "options" = "options",
  *     "hide_empty_tabs" = "hide_empty_tabs",
+ *     "remember_last_clicked_tab" = "remember_last_clicked_tab",
  *     "default_tab" = "default_tab",
  *     "configuration_data" = "configuration_data"
  *   },
@@ -85,7 +86,14 @@ class QuickTabsInstance extends ConfigEntityBase implements QuickTabsInstanceInt
   protected $hide_empty_tabs;
 
   /**
-   * Whether or not to hide empty tabs.
+   * Whether or not use a cookie to remeber the last clicked tab.
+   *
+   * @var bool
+   */
+  protected $remember_last_clicked_tab;
+
+  /**
+   * The default tab.
    *
    * @var bool
    */
@@ -126,6 +134,13 @@ class QuickTabsInstance extends ConfigEntityBase implements QuickTabsInstanceInt
     return $this->hide_empty_tabs;
   }
 
+  /**
+   * {@inheritdoc}
+   */
+  public function getRememberLastClickedTab() {
+    return $this->remember_last_clicked_tab;
+  }
+
   /**
    * {@inheritdoc}
    */
diff --git a/src/Entity/QuickTabsInstanceInterface.php b/src/Entity/QuickTabsInstanceInterface.php
index 80a6716..9efc0d6 100644
--- a/src/Entity/QuickTabsInstanceInterface.php
+++ b/src/Entity/QuickTabsInstanceInterface.php
@@ -41,6 +41,14 @@ interface QuickTabsInstanceInterface extends ConfigEntityInterface {
    */
   public function getHideEmptyTabs();
 
+  /**
+   * Returns boolean value of use last clicked tab cookie.
+   *
+   * @return bool
+   *   Use last clicked coookie tabs setting.
+   */
+  public function getRememberLastClickedTab();
+
   /**
    * Returns the number of the default tab for this instance.
    *
diff --git a/src/Form/QuickTabsInstanceEditForm.php b/src/Form/QuickTabsInstanceEditForm.php
index 3147893..45721df 100644
--- a/src/Form/QuickTabsInstanceEditForm.php
+++ b/src/Form/QuickTabsInstanceEditForm.php
@@ -139,6 +139,14 @@ class QuickTabsInstanceEditForm extends EntityForm {
       '#weight' => -3,
     ];
 
+    $form['remember_last_clicked_tab'] = [
+      '#type' => 'checkbox',
+      '#title' => $this->t('Remeber last clicked tab'),
+      '#default_value' => $this->entity->getRememberLastClickedTab(),
+      '#description' => $this->t('Use cookies to set the default tab to the last clicked tab by the current user.'),
+      '#weight' => -3,
+    ];
+
     $tab_titles = [
       QuickTabsInstance::QUICKTABS_DELTA_NONE => $this->t('- None -'),
     ];
diff --git a/src/Plugin/TabRenderer/AccordianTabs.php b/src/Plugin/TabRenderer/AccordianTabs.php
index 8250955..5d2d37d 100644
--- a/src/Plugin/TabRenderer/AccordianTabs.php
+++ b/src/Plugin/TabRenderer/AccordianTabs.php
@@ -94,9 +94,14 @@ class AccordianTabs extends TabRendererBase {
     }
 
     $options = $instance->getOptions()['accordion_tabs'];
-    $active_tab = $instance->getDefaultTab() == 9999 ? 0 : $instance->getDefaultTab();
-    $active = $instance->getDefaultTab() == 9999 ? FALSE : (int) $instance->getDefaultTab();
-    $collapsible = $instance->getDefaultTab() == 9999 ? TRUE : (int) $options['jquery_ui']['collapsible'];
+
+    $active_tab = \Drupal::request()->query->get('qt-'. $qt_id);
+    if($active_tab === NULL) {
+      $active_tab = $instance->getDefaultTab() == QuickTabsInstance::QUICKTABS_DELTA_NONE ? 0 : $instance->getDefaultTab();
+    }
+
+    $active = (int) $active_tab; //$instance->getDefaultTab() == 9999 ? FALSE : (int) $instance->getDefaultTab();
+    $collapsible = !$active_tab ? TRUE : (int) $options['jquery_ui']['collapsible'];
     $build['#attached'] = [
       'library' => ['quicktabs/quicktabs.accordion'],
       'drupalSettings' => [
diff --git a/src/Plugin/TabRenderer/QuickTabs.php b/src/Plugin/TabRenderer/QuickTabs.php
index 0b7f054..8efb53c 100644
--- a/src/Plugin/TabRenderer/QuickTabs.php
+++ b/src/Plugin/TabRenderer/QuickTabs.php
@@ -72,7 +72,11 @@ class QuickTabs extends TabRendererBase {
     $is_ajax = $instance->getOptions()['quick_tabs']['ajax'];
     foreach ($instance->getConfigurationData() as $index => $tab) {
       // Build the pages //////////////////////////////////////.
-      $default_tab = $instance->getDefaultTab() == 9999 ? 0 : $instance->getDefaultTab();
+      $default_tab = \Drupal::request()->query->get('qt-'. $qt_id);
+      if($default_tab === NULL) {
+        $default_tab = $instance->getDefaultTab() == QuickTabsInstance::QUICKTABS_DELTA_NONE ? 0 : $instance->getDefaultTab();
+      }
+      
       if ($is_ajax) {
         if ($default_tab == $index) {
           $object = $type->createInstance($tab['type']);
@@ -183,6 +187,7 @@ class QuickTabs extends TabRendererBase {
       'container' => [
         '#attributes' => [
           'class' => ['quicktabs-wrapper'],
+          'data-remember-last' => intval($instance->getRememberLastClickedTab()),
           'id' => 'quicktabs-' . $qt_id,
         ],
       ],
diff --git a/src/Plugin/TabRenderer/UiTabs.php b/src/Plugin/TabRenderer/UiTabs.php
index bc58bae..0131792 100644
--- a/src/Plugin/TabRenderer/UiTabs.php
+++ b/src/Plugin/TabRenderer/UiTabs.php
@@ -81,7 +81,10 @@ class UiTabs extends TabRendererBase {
     array_unshift($build, $tabs);
 
     // Attach js.
-    $default_tab = $instance->getDefaultTab();
+    $default_tab = \Drupal::request()->query->get('qt-'. $qt_id);
+    if($default_tab === NULL) {
+      $default_tab = $instance->getDefaultTab() == QuickTabsInstance::QUICKTABS_DELTA_NONE ? 0 : $instance->getDefaultTab();
+    }
     $build['#attached'] = [
       'library' => ['quicktabs/quicktabs.ui'],
       'drupalSettings' => [
