bootstrap tutorial - How to keep the current tab active on page reload in Bootstrap - bootstrap examples - bootstrap templates - bootstrap 3
Answer: Use the HTML5 localStorage Object
In Bootstrap, if you refresh the page the tab is reset to default setting. But, you can use the HTML5 localStorage object to save some parameter for the current tab locally in the browser and get it back to make the last active tab selected on page reload.
Example
The jQuery code in the above example simply gets the <a> element's href attribute value when a new tab has been shown using the jQuery .attr() method and save it locally in the user's browser through HTML5 localStorage object. Later, when the user refresh the page it retrieves this data and activate the related tab via .tab('show') method.