You will need to overtake the onclick event of links. If the link is a fragment identifier (such as "#products"), then that is an internal link that you'll need to specially handle.
When the link is a fragment identifiers (typically used internally), you'll need to load the tab that applies to it, and when the tab has finished loading you can then go to the intended destination, by setting the location hash to that fragment identifer. Now that the target exists, the page should behave as it normally would.
How do you know which tab that the link applies to? There are two ways.
You can look for the fragment identifier in your cache, and if it's not there you can load up the remaining tabs that haven't been loaded to check them as well.
Or, and this might be preferred, you can specify which tab the link belongs with, so that you can activate the tab and then set the location hash with the fragment identifier.