I was doing some troubleshooting and wanted to disable the “beforeunload” event listeners on a page. This is how I accomplished it with the Chrome browser.
The Allow / Block popup in Google Chrome is an all too familiar sight when browsing the web, however this can be prevented. We can change the setting to automatically Block all location requests (they will not be able to see your location) without seeing the popup.
The PDF Toolbar that comes up in Google Chrome when displaying a PDF can be suppressed by modifying the URL.