I ran into a similar requirement recently. I used sessions to record the vars I needed.
However I can do so because the user is required to click on links to move around the site (they can't guess the urls). That way I can control the variables stored on session. I didn't understand your requirement fully (got lost halfway) when I posted this. So I am suggesting but I'm not sure if that will solve your issue. --

