support for viewer in desktop mode; sane behavior on reload and resume