ecified
            var firstTabName = $('.nav-tabs .nav-link').first().attr('data-tab-name');
            activaTab(firstTabName);
        }
    }

    function clearPreviousAnchor() {
        var url = new URL(window.location.href);
        url.hash = ''; // Clear the hash part of the URL
        history.replaceState(null, null, url.toString());
    }

    // Activate the tab and scroll to anchor based on the URL when the page loads
    activateTabAndHeaderFromUrl();

    // Update URL query parameters wh