I use apex and visual force to create a list of customer cases. When they click on one it takes them to another VF page with a parameter in the url '?cn=00001234' this is used on the next page to retrieve the correct case number and show only specific details to the customer in a custom format. Works great but looks bad when printing. So I put a commandButton on the page that calls java script to open a new window with another visual force page designed for print layout. Also works great. But when we close the new window and are back on the detail view page the parameter '?cn=00001234' got stripped out of the old URL? I read the url with java to get the parameter to pass to the new page but nothing should be stripping the old parameter. Because the parameter is gone page refresh and the print view button won't work after the first time.
How do I prevent it from removing the parameters from the old url?