caching removed for simplicity, implemented pausing functionality before 'page:before-unload' event