First, which solution are you trying to implement and what does your code for it look like?
The visited() function will not work when transitioning to a new game using the first option (local storage), but should work using the second option (using SugarCube's save system). The <<if>> macro itself will work fine, and you will be able to use it to test variables from the previous chapter without issues in either case.
It should be fairly simple to get variables over, and you could potentially include the list of passages the player has visited in the first option if you need it. We need to see what your implementation looks like before we can help.