diff --git a/config/schema/quicktabs.schema.yml b/config/schema/quicktabs.schema.yml
index c59966872c654954a5453e2462e7aa4510d75838..a2ffee70fb4a90d8a21a994181041c68c1914827 100644
--- a/config/schema/quicktabs.schema.yml
+++ b/config/schema/quicktabs.schema.yml
@@ -22,6 +22,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 b8e2385d8fb27615b1cc43fd6e29ac0429691af6..72b6fbd47a8eabf6f1cef90b5bd1d9350f552f0d 100644
--- a/js/quicktabs.js
+++ b/js/quicktabs.js
@@ -120,35 +120,38 @@
       $(once('form-group', 'div.quicktabs-wrapper', context)).each(function () {
         const el = $(this);
 
-        const qtName = Drupal.quicktabs.getQTName(el);
-        const $ul = $(el).find('ul.quicktabs-tabs:first');
-
-        // Default cookie options.
-        const cookieOptions = { path: '/' };
-        const cookieName = `Drupal-quicktabs-active-tab-id-${qtName}`;
-
-        $ul.find('li a').each(function (i, element) {
-          const $link = $(element);
-          $link.data('myTabIndex', i);
-
-          // Click the tab ID if a cookie exists.
-          const $cookieValue = cookies.get(cookieName);
-          if (
-            $cookieValue !== '' &&
-            $link.data('myTabIndex') === $cookieValue
-          ) {
-            // Changed == to ===
-            $(element).click();
-          }
-
-          // Set the click handler for all tabs, this updates the cookie on every tab click.
-          $link.on('click', function () {
-            // Replaced .bind() with .on()
-            const $linkdata = $(this);
-            const tabIndex = $linkdata.data('myTabIndex');
-            cookies.set(cookieName, tabIndex, cookieOptions);
+        // only remember last clicked tab if the option is enabled.
+        if (el.data('rememberLast')) {
+          const qtName = Drupal.quicktabs.getQTName(el);
+          const $ul = $(el).find('ul.quicktabs-tabs:first');
+
+          // Default cookie options.
+          const cookieOptions = { path: '/' };
+          const cookieName = `Drupal-quicktabs-active-tab-id-${qtName}`;
+
+          $ul.find('li a').each(function (i, element) {
+            const $link = $(element);
+            $link.data('myTabIndex', i);
+
+            // Click the tab ID if a cookie exists.
+            const $cookieValue = cookies.get(cookieName);
+            if (
+              $cookieValue !== '' &&
+              $link.data('myTabIndex') === $cookieValue
+            ) {
+              // Changed == to ===
+              $(element).click();
+            }
+
+            // Set the click handler for all tabs, this updates the cookie on every tab click.
+            $link.on('click', function () {
+              // Replaced .bind() with .on()
+              const $linkdata = $(this);
+              const tabIndex = $linkdata.data('myTabIndex');
+              cookies.set(cookieName, tabIndex, cookieOptions);
+            });
           });
-        });
+        }
       });
     },
   };
diff --git a/src/Entity/QuickTabsInstance.php b/src/Entity/QuickTabsInstance.php
index 333b5a7f56b1c37459ba84ee51796b458e91d54c..91496be74ebb78783f4011b30d8df4f4171ba1a6 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"
  *   },
@@ -77,6 +78,13 @@ class QuickTabsInstance extends ConfigEntityBase implements QuickTabsInstanceInt
    */
   protected $options;
 
+  /**
+   * Whether or not to use a cookie to remember the last clicked tab.
+   *
+   * @var bool
+   */
+  protected $remember_last_clicked_tab;
+
   /**
    * Whether or not to hide empty tabs.
    *
@@ -129,6 +137,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 04389f7483fd9c704fbe2cfb4d52463e5e8234be..466f80c249c725fc408314e3dd437ea1d567c930 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 setting.
+   *
+   * @return bool
+   *   Use last clicked tab 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 d8b86297a86346a8dab4633ae6e9eb9cdc6af8c8..b5220f8757bfcb96bb085eb2b971d8310584125a 100644
--- a/src/Form/QuickTabsInstanceEditForm.php
+++ b/src/Form/QuickTabsInstanceEditForm.php
@@ -286,7 +286,7 @@ class QuickTabsInstanceEditForm extends EntityForm {
       $ordered_configuration_data[] = $item;
     }
     $this->entity->setConfigurationData($ordered_configuration_data);
-
+    $this->entity->set('remember_last_clicked_tab', $form_state->getValue('options')['quick_tabs']['remember_last_clicked_tab']);
     $status = $this->entity->save();
     if ($status == SAVED_NEW) {
       $form_state->setRedirect('quicktabs.admin');
diff --git a/src/Plugin/TabRenderer/QuickTabs.php b/src/Plugin/TabRenderer/QuickTabs.php
index d9220575c9ffe9a5a621885081c5bfebda5665d4..5cd674a583929f7ba47f8002a6b4e0481ce349fd 100644
--- a/src/Plugin/TabRenderer/QuickTabs.php
+++ b/src/Plugin/TabRenderer/QuickTabs.php
@@ -77,6 +77,14 @@ class QuickTabs extends TabRendererBase implements ContainerFactoryPluginInterfa
       '#description' => $this->t('Choose how the content of tabs should be loaded.<p>By choosing "Yes", only the first tab will be loaded when the page first viewed. Content for other tabs will be loaded only when the user clicks the other tab. This will provide faster initial page loading, but subsequent tab clicks will be slower. This can place less load on a server.</p><p>By choosing "No", all tabs will be loaded when the page is first viewed. This will provide slower initial page loading, and more server load, but subsequent tab clicks will be faster for the user. Use with care if you have heavy views.</p><p>Warning: if you enable Ajax, any block you add to this quicktabs block will be accessible to anonymous users, even if you place role restrictions on the quicktabs block. Do not enable Ajax if the quicktabs block includes any blocks with potentially sensitive information.</p>'),
       '#weight' => -6,
     ];
+    $form['remember_last_clicked_tab'] = [
+      '#type' => 'checkbox',
+      '#title' => $this->t('Remember last clicked tab'),
+      '#default_value' => $instance->getRememberLastClickedTab(),
+      '#description' => $this->t('Use cookies to set the default tab to the last clicked tab by the current user.'),
+      '#weight' => -3,
+    ];
+
     return $form;
   }
 
@@ -264,6 +272,7 @@ class QuickTabs extends TabRendererBase implements ContainerFactoryPluginInterfa
       'container' => [
         '#attributes' => [
           'class' => $classes,
+          'data-remember-last' => intval($instance->getRememberLastClickedTab()),
           'id' => 'quicktabs-' . $qt_id,
         ],
       ],