I can't seem to reproduce an issue here. I tested //echo $url with both Opera and Explorer, opening and closing them several times and checking the $url result each time, it worked fine every time for me. Which version of Windows are you using?