How to eliminate the "zombie" JSmols that persist when the number of JSmols changes: Reload the page (which includes the chapter in the URL already), specifying the view as ?v=# Am I already using query somewhere? YES I already had getInitialViewNumber() in util.js but it was unused. Now it is called in showInitialView which sets the initial view to display (ivn) in multiJmolClick(ivn). body onLoad: initChapter() -> showInitialView -> multiJmolClick(ivn) multiJmolClick(0) changes 0 to 1. In writeJmols() When currentJmolCount != jmolCount, reload with ?v=# location.reload() does not allow adding a query parameter. location.pathname returns the current pathname without http://. >> location.href returns the current URL with http://. location.assign("url") loads a new document, keeping the old one in the history for "back". >> location.replace("url") loads it, erasing the current url from the history, so no "back". In initChapter() I need to set currentViewNum? from ?v=# query parameter Then in showInitialView I need to call multiJmolClick(currentViewNum)