With the live preview option enabled, previewing a .js page to test the script does not work. (Interestingly, it works the first time, but not afterwards.)
There isn't really a way to unload the old version of a script; live preview should just disable itself on JS pages.