A reader asked Tech Advisor how to prevent pop-ups on websites asking them 'Are you sure you want to leave this page?'. We warned that turning off this feature is not always a good idea, given that you may lose unsaved changes, but that if it's really the route you want to go down you can do so by disabling JavaScript.

Disable JavaScript in Chrome

In Google Chrome, type chrome://settings/content into the address bar and hit Enter. Scroll down to and select the JavaScript section, then click the toggle next to enabled.

If you’d like to enable or disable JavaScript on a site-by-site basis, you can use the options below to Block or Allow certain sites.

Disable JavaScript in Firefox

In Firefox, type about:config into the address bar and hit Enter. Accept the warning, then search for 'javascript.enabled'. Double-click the entry to change it from enabled to disabled.