Dealing with Safari popups that won't go away
There have been a rash of popups that appear to take over Safari on iOS devices. These can be announcements that you have won an Amazon gift card, or an iPhone, or a warning that your device is infected with a virus. If you could just dismiss them they would be only an annoyance, but many cannot be dismissed and keep recurring every time you go to any website. I won't go into how they do this (it involves JavaScript manipulation), but there is a solution that I will discuss here.
Prevention
The best way to prepare is to install an ad blocker on your iOS device. There are several in the app store; all of them work. Which one to pick is an individual preference.
If you do see one of these "popups", tap in the address bar and just enter another URL, or tap on the overlapped boxes in the lower right (if you see ⋯⃝ tap on it to get to the boxes) and close the tab by tapping on the "x" in it. Whatever you do, don't tap anywhere in the popup or on the "close" button in the popup. It isn't a close button; it runs JavaScript code that inserts links that will be reused to allow the popup to stay in memory and display over and over. Too late for that? See the next section.
Mitigation
Apple has posted this tip regarding this problem: How to block pop-ups in Safari - Apple Support. If it works, great, but some malefactors have found ways around Apple's solution. The first thing to recognize is that these are really not popups; they are web pages designed to look like popups. And to remove them you must remove the page references. Here is a way to remove this intrusive bit of adware. Try this:
- Turn on airplane mode and turn off Wi-Fi if it remains on
- Open Safari
- Tap the overlapped squares in the lower right (if you see ⋯⃝ tap on it to get to the squares)
- Close every page by tapping the "x" in the left upper corner of the page
- When there are no pages swipe up from the bottom edge (or press HOME if you have an older iPhone) to exit Safari and wait a couple of seconds
- Force-quit Safari: How to force an app to close on your iPhone, iPad, or iPod touch - Apple Support
- Go to Settings/Safari and tap "Clear History and Website data"
- Turn off Airplane mode
This process works with the current state of intrusive adware. If the bad guys find a way around it post a response and I'll find a solution in this never-ending arms race.