fix data loss when HTTP and HTTPS pages are open in different tabs